Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Most efficient way of multi database query?

Status
Not open for further replies.

timpea

Programmer
Mar 2, 2005
2
0
0
GB
Hi,

I have an Access database (A) with a list of products

And an Access database (B) with related information to some products, there is nothing i can do about it being in 2 seperate databases and it has to stay like this.

Is it more efficient/quicker to:
While not A.EOF
B.Filter = "ID = "+ A.ID +""
If not B.EOF then 'Show information from B
A.MoveNext
Wend

OR:
SET B = Server.CreateObject("ADODB.Recordset")
While not A.EOF
B.Open "Select * from B where ID="+ A.ID +"", strConnect
If not B.EOF then 'Show information from B
B.Close
A.MoveNext
Wend


Thanks
Tim Pearson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top