Access 2000 and VB6 
Author Message
 Access 2000 and VB6

Hi

Is there a patch that enables me to use VB5 or 6 with an Access 2000
database.
I need it for a big corporate project.

If you know where I can download it, please email me on

Regards,

Oliver



Tue, 01 Jan 2002 03:00:00 GMT  
 Access 2000 and VB6
You need to upgrade to VB6 SR3. It comes with both ADO 2.1 and DAO 3.6, both
of which use Jet 4.0, the provider that can open Access 2000 databases.


Quote:
> Hi

> Is there a patch that enables me to use VB5 or 6 with an Access 2000
> database.
> I need it for a big corporate project.

> If you know where I can download it, please email me on

> Regards,

> Oliver



Tue, 01 Jan 2002 03:00:00 GMT  
 Access 2000 and VB6
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



Tue, 01 Jan 2002 03:00:00 GMT  
 Access 2000 and VB6
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"


Quote:
> 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




Tue, 01 Jan 2002 03:00:00 GMT  
 Access 2000 and VB6
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




Sun, 06 Jan 2002 03:00:00 GMT  
 Access 2000 and VB6
I did that and I get a "Type mismatch error" on the last line. You are
correct that it does work because with A2K Databases because if I leave the
data control out, I can assign the data directly to the text boxes.  But I
can't get it to work with the data control. BTW, Is it impossible then to
use the Data form wizard?

Ron



Sun, 06 Jan 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Access 2000 and VB6

2. access 2000 ET vb6

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

4. access 2000 to vb6

5. Columns in Access 2000 via VB6

6. Problem with ACCESS 2000 and VB6

7. Access 2000 and VB6

8. access 2000 in VB6 ??

9. Performance issue - Access 2000 using VB6 and ADO 2.1 with SQL

10. LIKE query gives different results in Access 2000 and VB6 SP5

11. Access 2000 and VB6

12. Access 2000 in VB6

 

 
Powered by phpBB® Forum Software