|
-
October 22nd, 2003, 06:56 PM
#9
Junior Member
This will get you a connection to your database.
dim cnn as adodb.connection
With cnn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Properties("Jet OLEDB:System Database") = c:\mymdw.mdw
.Properties("Jet OLEDB atabase Locking Mode") = adLockOptimistic 'row-level locking
.Properties("User ID") = "User"
.Properties("Password") = "Password"
.Open c:\mydb.mdb
.Properties("Jet OLEDB:Lock Retry") = 5
End With
'With the connection you can then create recordsets.
Dim rst as recordset
Set rst = New Recordset
rst.Open "Select * from MyTable", cnn, adOpenForwardOnly, adLockReadOnly
' Then loop through the recordset
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|