By the way:
SSJpn is talking about the the basic data control
(ref.: property "DatabaseName"
.
Not the ADO DC, which uses the JET OLEDB data provider, (which the basic data control doesn't).
The basic DC uses
DAO and not ADO or the JET OLEDB provider.
You need to update to VB SP3+ (
get SP5 however). This will also install the JET 4.0 driver and DAO 3.6, and change out the basic data control making it compatible with DAO 3.6), which is what is needed to connect to a JET 4 MDB (or, ACCESS 2000 mdb, if you wish to call it that)
If you want to use the OLEDB data control, then you need to add that to the project under PROJECT|CONTROLS.
Then, in order to connect to a JET 4.0 db, using the JET OLEDB 4.0 data provider, you need to have MDAC 2.0+ (or was it 1.5+) installed on the system...but, get MDAC 2.5. This is installed with VB6 SP5. This will also install the JET 4.0 OLEDB provider.
If you install a higher version of MDAC, you will need to install the newer version of the JET OLEDB provider seperately ( Jet 4.0 SP6 is the lastest), as this is not included in the MDAC anymore (2.6/2.7)
SSJpn:
1. Make sure you have as a minimum VB6 SP3.
2. Change the "Connect" property to "ACCESS 2000"
It should work now unless the database is corrupted.
If you want to use ADO, then:
1. Best to update to VB6 SP5
2. Set a reference under PROJECT|COMPONENTS to the "Microsoft ADO Data Control 6.0 (OLEDB)
3. Add this to your project, changing out the DAO DC, and, any complex binding controls like the DBGrid will need to be changed out for the ADO ones (such as the DataGrid instead of the DBGrid - this will also need to be added to the project under COMPONENTS).
The JET 4.0 OLEDB via ADO will be somewhat slower on larger databases than the DAO/JET 4.0 version, and the JET 4.0 is somewhat slower than the JET 3.51 version.
There is an extra layer that ADO needs to go through to get data from the JET database manager, and therefore it is slower than DAO.
And, a 4.0 MDB has it's data stored differently (UNICODE) than a JET 3.51. Therefore you cannot open a 2000 MDB with JET 3.51 or earlier.
And, if you try to open a JET '97 db with the JET 4.0, JET needs to do UNICODE conversions on the data coming from and going to the DB, which slows it down even more.
[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!