4 replies
by julianj
Well, access 2000 is supported in VB 6. Are you using DAO 3.51 or earlier to code your program? What I mean is that are you using the Data control packaged with VB 6? If you are, it will not work as the "old" data control is using DAO 3.51 and that cannot support access 2000 files.
To solve this, you can use another data control called the ADO data control. Goto "Project" > "Components" and select MS ADO data control. Or you can read data using program instead of the data control, but you need to import DAO 3.60 library from "Project" > "References".
Hope that helps and good luck
by davgordon
I had it right up until I selected the component. After using the tool tips I found the right component. After that I could see the database. I also unloaded the DAO 3.51 referance and loaded the DAO 3.6 referance.
Thank you for your time.
by miss kitty
Here's an example of code connecting to an Access database.
Dim objConn As New ADODB.Connection
Dim objCmd As New ADODB.Command
Dim objRS As New ADODB.Recordset
Dim objParam As ADODB.Parameter
Dim count As Integer
'set up the database pointer
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=E:\ACCESS\CONTRACT HAULERS\HAULER.mdb;User ID=ADMIN"
objRS.CursorType = adOpenDynamic
objRS.LockType = adLockOptimistic
'setting the Active Connection for the command object
objCmd.ActiveConnection = objConn
This is using an ADO connection.
Cathy
by davgordon
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending