Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    I have a vb app that opens an Access file to store data in. The program works great and has for 4 years using an Access 97 file. Now I want to convert the file to Access 2K. But I get a RTE 3343 when running the app now. I understand it has something to do with DAO 3.51 and A2K not being able to run unless you have DAO 3.6. What do I need to do to the app code to get this to work? I have added a reference to DAO 3.6 in the code but no luck. Also I read something about Jet 4.0 being needed but how can you tell if you have that version installed? Any help would be greatly appreciated.

    Thanks,
    Mark Santos

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    It sounds like you are trying to use DAO 3.6 without having actually converted the database to Access 2000. Otherwise, Jet 4.0 definitely *would* be available, since that's the Jet engine that Access2000 uses. How did you convert the Access back end?
    Charlotte

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    HI Charlotte,
    Thanks. The VB app uses an Access file to store data until it is sent back to another Access DB (this is the one you were helping with the security stuff earlier). The data container file was originally in Access 97. I want to convert it for obvious reasons. I converted the data file to Access 2000 then tried to get the VB app to talk to the file. This is where the problem lies. I tried in VB to add a reference to DAO 3.6 but it still didn't work. I must be missing some other part of the puzzle. Other ideas?

    Thanks,
    Mark Santos

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    What do you mean, it didn't work? Do you mean it wouldn't add the reference or what? And did you remember to uncheck the 3.51 reference first?
    Charlotte

  5. #5
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    Hi Charlotte,
    Yes 3.51 was un-checked (it won't let you have both checked anyway). What I mean by it not working was that I still get the RTE when I open the program. It is not able to open that Access 2K file as it does with the 97 file. Any other ideas?

    Thanks,
    Mark Santos

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    Not a clue. You can open the file from Access, I assume? Wait, I just had a thought! Do you have the DAO 3.6 reference set in *Access*? Access 2000 defaults to the ADO object model, so DAO is NOT checked by default. If you haven't already done so, set the DAO reference in Access and see if that fixes it.
    Charlotte

  7. #7
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    Hi Charlotte,
    I tried this and DAO 3.6 was already checked in the references in the Access file. Still no luck. What is weird now is that I don't get the RTE number just the verbage, "Unrecognized database format". Then after hitting "OK" three times the project appears to open. However, when I try to open one of the records it then gives RTE 3343. I also notice that I am not getting the LDB file so it can't be opening the file, I think.

    Thanks,
    Mark Santos

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    Did you compile the Access project to make sure there isn't any code problem? The only other thing I can think of is to create a new Access 2000 database, turn off Name Autocorrect, import all the objects from your 97 database (not the converted one), make sure the appropriate references are set, and then trying that one to see if it works. It sounds like you actually may have a problem with the database itself.
    Charlotte

  9. #9
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    Well, I didn't compile it but there is no code in this file, just 9 tables that hold some data. There are no queries, forms, macros, modules, or reports. I will try to make a new file and import the tables from the 97 file.

  10. #10
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    Make sure you open each table in design view, pull down the properties sheet, and turn off the subdatasheet property by setting it to [none]. That should improve performance, especially if you have created relationships between your tables. And don't forget to turn off Name Autocorrect from the Tools-->Options-->General tabl. That feature has been implicated in a bunch of database misbehavior.
    Charlotte

  11. #11
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    Hi Charlotte,
    I still can't get this file to work properly. I tried both suggestions listed in the previous post. Is there anything else except setting the DAO 3.6 reference in VB that I have to do to make it run properly?

    Thanks,
    Mark Santos

  12. #12
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    Hello Charlotte and All,
    As a note, I tried creating a new A2K file, renaming it to the required file and running the VB app. At first it told me I it could open one of the tables. I expected this due to the fact that I didn't import any of the other tables from the old file. I then imported the first table in the list and tried it again. This time I received the unrecognizable database format again. Does anybody have any other ideas? I gotta get this thing running on a A2K file instead of A97.

    Thanks!,
    Mark Santos

  13. #13
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    <img src=/S/hmmn.gif border=0 alt=hmmn width=15 height=15> I just went into VB6 and tried to open an Access 2000 database from the Visual Data tool. Regardless of references, I'm getting an error with the 2000 mdb, although it will open the 97 version just fine. Is that the method you're trying to use? The Visual Data tool add-in can only open databases up through Access 97, otherwise it throws a DAO error.

    if I select a data environment, open its properties dialog, and select the OLE DB Jet 4.0 provider, I can connect to a 2000 database, but this is an ADO connection, not DAO.

    I had no problem using the built-in DataControl and setting its DatabaseName property to the path and name of an Access 2000 database, setting its connect property to Access 2000, and selecting a table from the dropdown for Recordsource, then binding controls to table fields through that DataControl. That's where the DAO library comes in, by the way.

    Maybe you need to explain more about how your VB app is trying to connect to the Access database before we can be of any real help to you.
    Charlotte

  14. #14
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    Hi Charlotte,
    The "Connect" property fixed the problem although I still get an error when exiting the program (You left me a post on that one in the VB area). Can you explain what advantage there is to using DAO as opposed to using ADO?

    Thanks,
    Mark Santos

  15. #15
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DAO 3.51/3.6 Using VB and Access 2K (VB6 SP5 / A2K SR1)

    The biggest advantage is that it takes less code and fewer new objects because you can easily use the built-in datacontrol without having to resort to data environments or creating command objects in order to see the tables and their fields. You can use the ADO DataControl, but it has different objects and methods (and its own listbox and combobox), so any code you already have would have to be rewritten for ADO, which can be a major undertaking. If you don't know ADO already and you need to get this converted, use DAO and start learning ADO in your spare time.

    You didn't mention what error you're getting when you exit the program, so I don't know how to advise you there. Maintaining threads in two forums is confusing enough without trying to remember what was in the other thread.
    Charlotte

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •