Querying 2 databases with one query string

I can use the following code to create a conection string:

 sConnect = "Provider=SQLOLEDB;" & _
             "Data Source=Ben;" & _
             "Initial Catalog=Northwind;" & _
             "Integrated Security=SSPI"

...then execute a SQL statement to return the query results to my workbook.

Is it possible though, to store the results of a query that joins 2 tables 
contaned in separate SQL databases?

Thanks

Ben
0
Latham (1)
10/25/2005 8:17:01 PM
excel.misc 78881 articles. 5 followers. Follow

0 Replies
345 Views

Similar Articles

[PageSpeed] 40

Reply:

Similar Artilces:

Hyperlink help #2
I have an array formula that creates a hyperlink:- =IF(K24=0,"",HYPERLINK("[inventory.xls]Inventory!a"&MATCH($A$1&$A24& $B24,Inventory.xls!$A$2:$A$10000&Inventory.xls!$D$2:$D $10000&Inventory.xls!$E$2:$E$10000,0)+1,"[inventory.xls]Inventory! a"&MATCH($A$1&$A24&$B24,Inventory.xls!$A$2:$A$10000&Inventory.xls!$D $2:$D$10000&Inventory.xls!$E$2:$E$10000,0)+1)) this works and creates the hyperlink:- [Inventory.xls]Inventory!a1 this works fine, but when the workbook inventory.xls is closed, nothing at all works when i clickon th...

Timer for Queries?
Does anyone know of a macro or add-on that I could use as a simple timer for queries? I don't like to use the CPU time in the Task Manager because of it's inaccuracy when not receiving full CPU usage. THanks for any suggestions -- cmungs Exactly what are you trying to accomplish? Are you trying to cause a query to run automatically every so often? If so, you will need to use the timer event on a form to do that. -- Lynn Trapp Microsoft MVP (Access) www.ltcomputerdesigns.com "cmungs" <cmungs@discussions.microsoft.com> wrote in message news:88EC7019-045F-4EF...

CRM 1.2 and SBS2003
Is anyone running CRM 1.2 on SBS2003? I have heard that installing it wipes out the companyweb. Are there any other issues to look out for? Thanks. Dewayne I am running it on SBS2003 with no issues. Of course because SBS incorporates a lot of software it does pay to monitor the server more closely than normal as its usually hosting a domain controller, exchange, sql , crm and more "Dewayne Chappell" <dewayne_chappell@hotmail.com> wrote in message news:eeUaLQE8DHA.1640@TK2MSFTNGP11.phx.gbl... > Is anyone running CRM 1.2 on SBS2003? I have heard that installing it wi...

Erratic results from query criteria
I am getting different results from running the same query with the same selections. One moment it is all behaving as expected, the next it has gone haywire. (I have done what appears to me to be EXACTLY what I have done in another database, where it works perfectly every single time.) In a query I have, amongst others, the following fields: Category SubCategory Company I want to be able to select any OR ALL of the relevant fields. I have the following criteria: Like "*"&[Type Category otherwise leave blank for ALL]&"*" Like "*"&a...

recurring invoice #2
Is there a way to set up a recurring invoice in Money 2004 small business version. I am trying to setup a recurring monthly invoice for my customers Thanks ...

Cannot use object linking and embedding error #2
Hi, I get an error when opening excel 2003 indicating "Cannot use object linking and embedding error". Does anyone have a fix for this? Could not find anything on it. Please let me know You may have the MSBlast virus See http://www.computing.net/office/wwwboard/forum/1185.html Cheers from North Yorkshire UK John P "Todd" <anonymous@discussions.microsoft.com> wrote in message news:09cb01c3d524$1fb9e000$a601280a@phx.gbl... > Hi, > > I get an error when opening excel 2003 indicating "Cannot > use object linking and embedding error". &g...

Update Query ?
Is there a way to 1) Assign events when adding in data thru an update query for example if you append a bunch of data into a table could you then do some kind of an update query to say if there is an initial event and no others tag this one Renewal 1 etc.. the only real data you have to go on would be Customer A and the total amt .. the event, renewal event and the delta would all need to be added in example: Say Customer A comes in with an initial deal then Customer A renews their deal So, the data would look like when you're done.: Year Custo...

design query match anywhere?
In the design query I want to match the letters "ABC" anywhere in the column 'description'. I could not get instr to work by using: InStr(description, "ABC")) > 0 How else can I match ABC (upper and lowercase) to anywhere in my 'description' column? Thanks! Are you saying you put that InStr bit as a criteria under your Description field in the query designer? Try putting Like "*ABC*" as the criteria instead. Alternatively, you could add a computed field to the query InStr([Description, "ABC") and then put >0 as the ...

Unexpected Error- Running Advance Find Query
I am getting a message that says "Unexpected Error An Error has occurred" when I am running an advanced find query on two custom entities. It seems to be when I have certain custom fields included in my view that the query errors out. Any help on this would be greatly appreciated. Thanks so much. Just wanted to add that I seem to get errors when there is a 0.00 amount in these fields... "TJ" wrote: > I am getting a message that says "Unexpected Error An Error has occurred" > when I am running an advanced find query on two custom entities. It se...

recordset "over" 2 forms
I think this is a rather basic question and difficult to explain, but I'll try I have this form with 1 entryfield and 1 puhbutton In this entryfield I enter a name, or part of a name I click the pushbutton and another form opens, based upon what I entered in the first form The code for the pushbutton of the first form is: Private Sub Knop13_Click() If IsNull(Me!Naam_lk) = False Then If MsgBox("Je koos een naam", vbOKOnly, "Let op") Then End If End If If IsNull(Me!Naam_lk) = False Then Dim g As Form, f As Form Dim db As Database Set db = Cur...

It it possible to create a database in Access for this:
Hi, Im trying to create a database, but not having much luck. Im new to MS Access. I would like to use a switchboard that people open - it will be used by at least 6 people - so when they open it they have 3 or 4 options to choose from - nice a simple - not confusing for anyone on where to go or what to do. On that i was going to add a form to fill in details on clients. Then from the information that is added in that goes to a table. Such as Name, Number, DOB, location will be filled out for each client. Under that - 10 drop down menus to click on different jobs. Each job goes into a sep...

OWA over SSL #2
Hello, I have OWA 5.5 with Exchange 5.5 mailbox server, OWA with SSL certificate installed. If I were to re-install OWA, would I lose the certificate? As long as you have the original certs and use the same domain name, you should be able to reinstall the certs in IIS without a problem. -EricL "MAX" wrote: > Hello, > I have OWA 5.5 with Exchange 5.5 mailbox server, OWA with SSL certificate > installed. If I were to re-install OWA, would I lose the certificate? ...

Obtaining information from a database for a worksheet
I have a seperate datebase set up. What I need to do is ... in a seperate worksheet obtain information for a certain cell and the row that corralates to be able to feed into a seperate worksheet. Example: From Database Need information that corrolates with column A Row 2 which would be a registration number. I need the information from ColumnB row 2 (last Name), Column C row 2 (first name), ColumnG Row 2, (street address) Column H row 2 (city), Colum I row 2 ( State), Column J row 2 (zip Code) , to be automatically linked to another file so that we do not have to do a copy paste. I do...

Which one first?Install Windows Server 2003 SP1 or Exchange SP2 ? #2
Hi, We are running Exchange 2003 on Windows Server 2003. We planned to update the software in terms of patches, so which one should I do first, the OS patches (SP1 and onwards) or the Exchange patches ? By the way, any issue with Exchange SP2 ? Rgrds, Zul See http://go.microsoft.com/fwlink/?linkid=37488 and http://support.microsoft.com/?kbid=896742. I would recomment upgrading Exchange first. -- Regards, Roland "Zul J" wrote: > Hi, > > We are running Exchange 2003 on Windows Server 2003. We planned to update > the software in terms of patches, so which one...

pass through query
If a combobox is populated by a pass-through query, does it requery every time the form is closed and reopened? Thanks, Sam Yes. John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Sam wrote: > If a combobox is populated by a pass-through query, does it requery every > time the form is closed and reopened? > Thanks, > Sam ...

service pack 3 #2
After updating a windows XP machine with Office 2000 service pack 3 unable to open email attachments. When I go back to service pack 2 everything is fine. Does anyone have a solution to this problem? I would preper to put SP3 back on the computer but the user gets attachments everyday. Anne <Anne@discussions.microsoft.com> wrote: > After updating a windows XP machine with Office 2000 service pack 3 > unable to open email attachments. When I go back to service pack 2 > everything is fine. Does anyone have a solution to this problem? I > would preper to put SP3 back on th...

a count field in a query?
Hello, I have a query in which I would like to create a field which increments by 1 for each record selected, so if there are 10 records selected by the query, this column would show numbers 1 to 10. Ideally I would like to have some text in front of each number, say invoice1, invoice2 etc. From a previous posting I realise that this is frowned upon but it would be the simplest solution for my problem! How can I do this? Thanks Geoff On Mon, 03 Dec 2007 08:54:00 +0000, Geoff Cox <<>> wrote: >Hello, > >I have a query in which I would like to create a field which >...

getpivotdata function #2
In Excel 2000, can I have more than one data field in my pivot table and still use the GETPIVOTDATA function? My pivot table is laid out as such: Date DesShop Pathway Data 200501 200502 240 Database Sum of DeliveryQty 12 14 Sum of DeliveryAmt 15853 15652 Retail Sum of DeliveryQty 3 4 Sum of DeliveryAmt 2997 7888 Grassroots Sum of DeliveryQty 0 Sum of DeliveryAmt 0 Managed Care Sum of DeliveryQty 1 Sum of DeliveryAmt 1995 240 ...

about CFormView #2
I am developing a application using CFormView. But I am not getting how to change the default form displayed in the frame window. Please tell me how to change the form displayed in framewindow just by clicking a button on the form. Thanking you. Prashant wrote: > > I am developing a application using CFormView. > But I am not getting how to change the default form > displayed in the frame window. > Please tell me how to change the form displayed in > framewindow just by clicking a button on the form. > Thanking you. Search MSDN for "VSWAP32" for code to chan...

Saving Username and Pass with Web Queries
I am pulling data from a website that requires you to provide a usernam and password everytime you visit the site. Excel has cachin capabilities, but everytime you close excel and try and open up th spreadsheet again, it can't login. What is the fix for this? Thanks, Hend -- Message posted from http://www.ExcelForum.com Bump! --- Message posted from http://www.ExcelForum.com/ ...

Birthday query for many children in one record
I have a database for the church, it has one main flat table only. Each record for the parents have field for child1 name, child1birthday, child2 name, child2birthday, child3 name, child3birthday - up to 5 children. I am having difficulty trying to get a report to list the birthdays of the children like this parent name, child 1 name, child 1 birthday month etc. so you get something like this:- Parent John Smith, child Mary Smith January 3 Parent Fred Jones, child Bert Jones March 4 Parent John Smith, child Jane Smith March 6 Parent Harry Brown, child Jane Brown March 6 Parent Bert Taylor,...

Importing contacts #2
We're importing a large number of contacts, spread across a large number of contact lists, into individual users Outlook. The imports are currently from CSVs. We do file|import. All works very well. EXCEPT for the "subject" field. Say, for example, the contact is Mr. Bill Gates. He shows in the address book not as "Gates, Bill" or "Bill Gates", but "Mr. Bill Gates". I believe this is because that, for some reason, the "subject" field is being populated that way. I need a way to programatically force these contacts into a &qu...

Printing Statements #2
Going to 'Routines | Sales | Statements' is there an easy way to print *only* >60 days? The only option I find is Past Due which is not what we are looking for. TIA -- Roy Sinnamond roys AT bigbolt DOT net ...

Space problem with .NET 2.0
I am loading an XML file and applying the XSLT using .net 2003 (C#). XSLT will add Space character in the xml. I am using the entity value for space character &#32. it works fine in .net 1.1 whereas in .net 2.0 the space character is not showing up in the xml at all. Any idea why this works in ..NET 1.1 and not the .NET 2.0 parser? However, if I use the entity (&#160) then it works well for both .net 1.1 and .net 2.0. Is this a known issue? Any suggestions on why the space is not showing up with .NET 2.0 would be appreciated. Gaurav wrote: > I am loading an XML file and ap...

Comparing text strings in cells
A cell contains a number of text strings which form sentences. Text from another source is pasted into another cell via the edit bar, it may be exactly the same or not. The question is, is it possible for excel to highlight where any differences occur between to contents of the cells - the pasted in text would be highlighted perhaps? -- Thank you very much for your advice Best Wishes Andy ...