Results 1 to 7 of 7

Thread: Access '00?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    Omaha, NE, USA
    Posts
    28
    ______ 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.
    - Ovid -

  2. #2
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    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)

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Actually, it's DAO 3.6 you'll want to set a reference to....

  4. #4
    Member
    Join Date
    Oct 1999
    Location
    Snellville, GA, USA
    Posts
    38
    If you are doing code re-write, I would suggest strongly using ADO 2.0.

    -Elias

  5. #5
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    Thanks for the correction ClunietP. It is 3.6

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    Omaha, NE, USA
    Posts
    28

    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.)

  7. #7
    Addicted Member pardede's Avatar
    Join Date
    Jan 2000
    Posts
    232
    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
  •  



Click Here to Expand Forum to Full Width