Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access2000 and vb6 1

Status
Not open for further replies.

ksrajah

Programmer
Jun 22, 2001
2
0
0
GB
hi
could anyone help me please?
i am tring to connect a access2000 database(db1.mdb) with vb
as dim db as database
dim rs as recordset
set db = opendatabse("c:\mydocuments\db1.mdb")
but all the time i endup with error code 3343
unrecognized database format c:\my documents\db1.mdb
how could i solve the problem
thanks you very much
shan
 
Hello!
try giving a space in my documents in the statement of opendatabase()
This should solve ur problem.
 
Hi, I had the same problem accesing Access 2000 DB with DAO. This problem is reported at Microsoft Web Site (Q238401). To solve this problem you have to add to your project the reference "Microsoft DA0 3.6 Object Library" and change your code:

Option Explicit
Private daoDB36 As Database
Private rs As DAO.Recordset
Dim sPath As String

Private Sub Form_Load()
sPath = _
"C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb"
Set daoDB36 = DBEngine(0).OpenDatabase(sPath)
Set rs = daoDB36.OpenRecordset("Customers")
Set Data1.Recordset = rs
End Sub

This example is from Microsoft Web Site.

The sam problem could happend if you use ADO with the Microsoft.Jet.OLEDB.3.51 provider

Regards, Jorge
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top