I have Access 2k, and I wan't to use a database in VB,
BUT, I dont want to have to use the ADO Data Control for everything I do...
Is there anyway I can make an Access 97 Database using Access 2000???
Thank You,
Dennis
Printable View
I have Access 2k, and I wan't to use a database in VB,
BUT, I dont want to have to use the ADO Data Control for everything I do...
Is there anyway I can make an Access 97 Database using Access 2000???
Thank You,
Dennis
Why not just use DAO 3.6? That works with Access 2000. Alternatively, just use ADO in the normal way, without the Data Control.
How do I use ADO in the normal way without the contorl???
You can use ADO without using ADO control by adding Microsoft ActiveX Data Objects 2.x Library. Click on Project->References and looking for it.
Example:
Code:Dim objConn As ADODB.Connection
Dim objRs As ADODB.Recordset
Dim strSQL As String
Set objConn = New ADODB.Connection
Set objRs = New ADODB.Recordset
'Connect the database via an ODBC
With objConn
.ConnectionString = "DSN=XXX;UID=XXX;PWD="
.Open
End With
'Retrive data into a recordset
strSQL = "SELECT * FROM TABLENAME"
With objRs
.Open strSQL, objConn, adOpenForwardOnly, adLockReadOnly
End With
Thank you, I got it working, I had to mess with the connection string.... a lot... but it works, and Thanks to both of you :)