VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Query2MDB

Paul Morris #2  (1 Submission)   Databases/Data Access/DAO/ADO   Advanced   Wed 3rd February 2021

I needed to query 2 password protected Access databases with a single SQL statement.
The Microsoft web page https://support.microsoft.com/kb/113701 was helpful and gave me hope that it may be possible, but was not too clear.
I use ADO with VB6 whereas the Microsoft example was for VB3 and the old ODBC. The Microsoft example worked almost straightaway for me if the databases had no password protection, it was the password protection that made it more difficult.
Eventually after quite a bit of experimentation I cracked it and I thought I must share this with fellow coders in case they have the same requirement.

Assumes
There are 2 databases with this code: - 1. BookSale_2002.mdb - password = ABCD 2. BS2.mdb - password = 1234 They are the BookSale.mdb database, supplied by Microsoft in Visual Studio, with the tables split between them. The 2 databases should be located in the same folder as the VB files.

Rate Query2MDB (3(3 Vote))

Download Query2MDB

Query2MDB Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters