Terence-
I'm wondering why you're using ADO. I would have done:
Dim db As DAO.Database, rst As DAO.Recordset
Set db = DBEngine(0).OpenDatabase("C:\E_FORM\" & _
"Database1.accdb;"
Set rst = db.OpenRecordset("Legacy3_filled", dbOpenDynaset)
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Terence
Sent: Tuesday, July 26, 2011 4:15 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] unrecognized database format...is this a reference
problem ?
This code worked with MDB, but I am now altering it for accdb. Code is as
follows"
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\E_FORM\" & _
"Database1.accdb;"
rst.Open "Legacy3_filled", cnn, _
adOpenKeyset, adLockOptimistic
Does anything appear wrong? or am I using the wrong reference components ?
Terence
------------------------------------
Yahoo! Groups Links
Selasa, 26 Juli 2011
RE: [MS_AccessPros] unrecognized database format...is this a reference problem ?
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar