PDA

Click to See Complete Forum and Search --> : Access 97


Sep 9th, 2000, 11:04 AM
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

parksie
Sep 9th, 2000, 11:44 AM
Why not just use DAO 3.6? That works with Access 2000. Alternatively, just use ADO in the normal way, without the Data Control.

Sep 9th, 2000, 12:01 PM
How do I use ADO in the normal way without the contorl???

sanon
Sep 9th, 2000, 04:26 PM
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:

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

Sep 9th, 2000, 07:06 PM
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 :)