|
-
Mar 19th, 2000, 07:06 AM
#1
Thread Starter
Junior Member
______ Any idea why my Data Source object doesn't recognize MS Access 2000 files as valid database files? I know it is recognizing later versions of the same database file, but when I put the newer version in as the database name and then try to select a recordsource, it tells me that it is not a valid database file. If it would make a difference, I have downloaded SP3 for my VB6. Can you help? Please do.
-
Mar 19th, 2000, 04:03 PM
#2
Addicted Member
I presume you're using data controls and set the datasource property to the access2000 database. Well this does not workd with VB6/access2000: you need reference to DAO 4.0 but data control's datasource property is set to work with DAO 3.5 or lower. So what you need to do is avoid using the datasource property but open a recordset using code and assign it to the data control like this:
Code:
dim db as database, rs as recordset
set db = opendatabase(mydbname)
set rs = db.openrecordset(tablename)
set datacontrol1.recordset = rs
don't forget to set a reference to the correct version of DAO (or ADO if you're using it)
-
Mar 19th, 2000, 11:59 PM
#3
Guru
Actually, it's DAO 3.6 you'll want to set a reference to....
-
Mar 20th, 2000, 01:21 AM
#4
Member
If you are doing code re-write, I would suggest strongly using ADO 2.0.
-Elias
-
Mar 20th, 2000, 02:36 PM
#5
Addicted Member
Thanks for the correction ClunietP. It is 3.6
-
Mar 21st, 2000, 02:29 PM
#6
Thread Starter
Junior Member
Not Working...
Even with the code you supplied me, I end up getting a database format not recognized. With your code it does it when the project is run, rather than when I tried to select the the recordsource. Any ideas? (I do have an Office '97 CD, but when I install and run Access '97, I recieve an error stating that I don't have the license information on this computer.)
-
Mar 22nd, 2000, 10:58 PM
#7
Addicted Member
are you saying you are tring to select the recordsource in the design environment? well, i'm affraid you can't do that, so it might be true that you could only use code to access the database.. maybe someone else has a workaround?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|