The trick in using DAO 3.6 in VB6 is to reference in the project settings to
DAO 3.6 instead of 3.51.
Then you can use the datacontrol on the form and do not set its database
properties at this time. Next, in your code you need to this:
Sub Init
Dim objDatabase as DAO.Database
Dim objRecordset as DAO.Recordset
'create the database and recordset objects
set objDatabase = OpenDatabase("<path to the database>")
set objRecordset = objDatabase.OpenRecordset("<table name>",....)
'now attach this recordset to the datacontrol. The recordset has the
same interface
'so the datacontrol won't know it is actually a new version
Set Data1.Recordset = objRecordset
'and voila... now everything works
End Sub
You can check the description of the datacontrol in the online MSDN database
at microsoft
http://msdn.microsoft.com/library/?FinishURL=/msdn/library/default.htm
Goto the Visual Basic documentation etc.
Quote:
> Well, I could never get the data wizard to work with Access 2000 databases
> either. For some reason Microsoft forgot to update them! Your best bet is
to
> forget about the wizards and create the forms from scratch. In the ADO
data
> control, however, make sure to select Jet 4.0 as the OLE DB provider.
> Here's an example connection string if it helps you:
> "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDatabase.mdb;Persist
> Security Info=False"
> > I loaded up the SP# but it still tells me "Unrecognized Access format".
Is
> > there something else I have to do to have the Data wizard work?
> > Ronald Levy, MD
> > Assistant Professor Anesthesiology
> > UTMB-Galveston