Connecting to an Access 95 database via an ODBC driver in VB 5.0 
Author Message
 Connecting to an Access 95 database via an ODBC driver in VB 5.0

I am presently having difficulty connecting to an Access 95 database via an
ODBC driver.  I have two DSN created; one for a SQL Server database and one
for an Access database.  

I have no problems connecting to the SQL Server database.  It's the Access
database that has got me in a snag.  I figured the code would be
similar....but I'm receiving the following run-time error.

Error 3423

You can not use ODBC to import from, export to, or link an external
Microsoft Jet or ISAM database table to your database.

The connection code I am using is as follows:

Set gdb = OpenDatabase("", False, False, "ODBC;DSN;CSAccess;UID=;PWD=;"

If anyone knows what I need to do can you please let me know.

Thanks,
Craig



Fri, 21 Jul 2000 03:00:00 GMT  
 Connecting to an Access 95 database via an ODBC driver in VB 5.0

Here's what I've done.  And it connects to Access & SQL Server:

    Set theWorkspace = CreateWorkspace("ODBCWorkspace", "software", _
        "", dbUseODBC)
    Workspaces.Append theWorkspace
    Set theDB = theWorkspace.OpenDatabase("", False, False,
"ODBC;DSN=CSAccess" +         ";UID=Admin;PWD=;")

BTW I am using DAO 3.5

        Check Project -> References

hth
Vince



Quote:
> I am presently having difficulty connecting to an Access 95 database via
an
> ODBC driver.  I have two DSN created; one for a SQL Server database and
one
> for an Access database.  

> I have no problems connecting to the SQL Server database.  It's the
Access
> database that has got me in a snag.  I figured the code would be
> similar....but I'm receiving the following run-time error.

> Error 3423

> You can not use ODBC to import from, export to, or link an external
> Microsoft Jet or ISAM database table to your database.

> The connection code I am using is as follows:

> Set gdb = OpenDatabase("", False, False, "ODBC;DSN;CSAccess;UID=;PWD=;"

> If anyone knows what I need to do can you please let me know.

> Thanks,
> Craig



Sat, 29 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Connecting to an Access 95 database via an ODBC driver in VB 5.0

2. 32-bit ODBC driver for Oracle via SQL*Net on Windows 95

3. Connecting a VB.Net to a database via ODBC

4. Connect to Gupta database via ODBC using VB

5. Connecting vb4 to an ingres database using datadirect odbc driver

6. Connect Informix database thru ODBC driver using Visual Basic

7. ODBC database errors in VB 5.0 and Access 97

8. Accessing DB via Oracle odbc driver

9. VB 4.0 Database Access via ODBC

10. Connecting to MSAccess Database via ODBC

11. 32bit ODBC driver for Windows 95 running SQLBase5.2 or 6.0

12. Does Visigenic ODBC driver work with Windows 95?

 

 
Powered by phpBB® Forum Software