Click to See Complete Forum and Search --> : ADO


AnesNuno
October 8th, 2001, 10:51 AM
How can i connect to a access database using ADO?

Iouri
October 8th, 2001, 10:55 AM
Dim Cnn As ADODB.Connection

'In the place where you want to establish your connection, such
'as the Initialize event of a class module, enter the following:

Dim sConn As String
Set Cnn = New ADODB.Connection

sConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & DBNAME & _
";Persist Security Info=False"

With Cnn
.CursorLocation = adUseClient
.Open strConnect
End With



Iouri Boutchkine
iouri@hotsheet.com