How could I modify the following code to update my customer table with let's say the Northwind customer table?
Would I need another connection object or just another recordset object?
Private Sub UpdateCustomer_Click()
Dim cnnJet As ADODB.Connection
Dim rst As ADODB.Recordset
'Open a connection using the Microsoft Jet provider.
Set cnnJet = New ADODB.Connection
Set rst = New ADODB.Recordset
cnnJet.Provider = "Microsoft.Jet.OLEDB.4.0"
cnnJet.Open "C:\Microsoft Office 2000\Office\Samples\Northwind.mdb"
With rst
.Source = "SELECT * FROM Customers"
.ActiveConnection = cnnJet
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open
End With
Do Until rst.EOF
'...???
Loop
End Sub
Would I need another connection object or just another recordset object?
Private Sub UpdateCustomer_Click()
Dim cnnJet As ADODB.Connection
Dim rst As ADODB.Recordset
'Open a connection using the Microsoft Jet provider.
Set cnnJet = New ADODB.Connection
Set rst = New ADODB.Recordset
cnnJet.Provider = "Microsoft.Jet.OLEDB.4.0"
cnnJet.Open "C:\Microsoft Office 2000\Office\Samples\Northwind.mdb"
With rst
.Source = "SELECT * FROM Customers"
.ActiveConnection = cnnJet
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open
End With
Do Until rst.EOF
'...???
Loop
End Sub