Access 2000 with VB6.0 - Stopped working...why? 
Author Message
 Access 2000 with VB6.0 - Stopped working...why?

Hi.  I'm a bit of a newbie, so I apologize for the question if it's been
posted before, but I have a program written in VB6.0 that accesses an Access
97 database via DAO and it works perfectly.  However, when I convert the
database to Access 2000, I get an error message when running my program that
says:

Runtime error '3343'
Unrecognized database format 'c:\mydatabasepath\mydatabase.mdb'

This seems to happen no matter what Access 2000 database I attempt to open
(either a converted Access 97 one or a new database).  Here's the line in my
VB code:

Private Sub Form_Load()
    Set dbs = OpenDatabase("c:\my documents\mytest.mdb")
    Set rsResults = dbs.OpenRecordset("Results", dbOpenDynaset)
End Sub

Am I doing something wrong?  The error occurs on the line that reads 'Set
dbs = OpenDatabase...'

Any help would be greatly appreciated.  If you wouldn't mind, please reply

Thanks.
Steve



Mon, 04 Aug 2003 14:15:49 GMT  
 Access 2000 with VB6.0 - Stopped working...why?
You will need to download the latest service pack to allow you to load the
access 2000 database.

You can get from www.microsoft.com/downloads


Quote:
> Hi.  I'm a bit of a newbie, so I apologize for the question if it's been
> posted before, but I have a program written in VB6.0 that accesses an
Access
> 97 database via DAO and it works perfectly.  However, when I convert the
> database to Access 2000, I get an error message when running my program
that
> says:

> Runtime error '3343'
> Unrecognized database format 'c:\mydatabasepath\mydatabase.mdb'

> This seems to happen no matter what Access 2000 database I attempt to open
> (either a converted Access 97 one or a new database).  Here's the line in
my
> VB code:

> Private Sub Form_Load()
>     Set dbs = OpenDatabase("c:\my documents\mytest.mdb")
>     Set rsResults = dbs.OpenRecordset("Results", dbOpenDynaset)
> End Sub

> Am I doing something wrong?  The error occurs on the line that reads 'Set
> dbs = OpenDatabase...'

> Any help would be greatly appreciated.  If you wouldn't mind, please reply

> Thanks.
> Steve




Mon, 04 Aug 2003 18:26:31 GMT  
 Access 2000 with VB6.0 - Stopped working...why?
Steve,

If you look into the References dialog on your Project | References menu
item, you'll see that you have Microsoft DAO 3.5 Object Library selected
(checked). Uncheck that and check the 3.6 version instead.

Cecil

--

-------------------------------------------
Cecil A. Galbraith
http://www.codesoup.com
Programmers Utilities/Tips
-------------------------------------------


Quote:
> Hi.  I'm a bit of a newbie, so I apologize for the question if it's been
> posted before, but I have a program written in VB6.0 that accesses an
Access
> 97 database via DAO and it works perfectly.  However, when I convert the
> database to Access 2000, I get an error message when running my program
that
> says:

> Runtime error '3343'
> Unrecognized database format 'c:\mydatabasepath\mydatabase.mdb'

> This seems to happen no matter what Access 2000 database I attempt to open
> (either a converted Access 97 one or a new database).  Here's the line in
my
> VB code:

> Private Sub Form_Load()
>     Set dbs = OpenDatabase("c:\my documents\mytest.mdb")
>     Set rsResults = dbs.OpenRecordset("Results", dbOpenDynaset)
> End Sub

> Am I doing something wrong?  The error occurs on the line that reads 'Set
> dbs = OpenDatabase...'

> Any help would be greatly appreciated.  If you wouldn't mind, please reply

> Thanks.
> Steve




Mon, 04 Aug 2003 20:52:20 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Access 2000 with VB6.0 - Stopped working...why?

2. Outlook 2000: VBA Stopped Working

3. SQL string not works in VB and works in Access 2000

4. Why does this piece of code work with Word 97 but not Word 2000

5. Why doesn't this code work on win 2000

6. why GetFileAttributes() in Windows 2000 without network works different than on NT/Win9x

7. Access 2000 VBA code not working Access 2002

8. DLL usage - works in Access 97 but not in Access 2000

9. Program from access 97 won't work in access 2000

10. Link Failure in Access 2000 that works in Access 97

11. Code from Access 2.0 not working in Access 2000

12. Getting back the formatted MsgBox in Access 2000 that worked in Access 97

 

 
Powered by phpBB® Forum Software