I am using following code to create a connection and recordset object...It works fine...

Now can some one shows me how to use COMMAND OBJECT of ADO to update, delete or adding a new record in database...

VB Code:
  1. Option Explicit
  2.  
  3. Public cnnLocation As ADODB.Connection
  4. Public rsLocation_Network As ADODB.Recordset
  5.  
  6. Public strLocation_Network As String
  7.  
  8. Public strApp_Path_Network As String
  9.  
  10. Public Sub ADOLocation()
  11.     Set cnnLocation = New ADODB.Connection
  12.     Set rsLocation_Network = New ADODB.Recordset
  13.  
  14.     strConnectionLocation = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  15.                         "Data Source=" & App.Path & "\CALMS.mdb;" & _
  16.                         "Persist Security Info=False"
  17.    
  18.     cnnLocation.ConnectionString = strConnectionLocation
  19.     cnnLocation.Open strConnectionLocation
  20.    
  21.     strLocation_Network = "SELECT * FROM [Network]"
  22.     rsLocation_Network.Open strLocation_Network, cnnLocation, adOpenDynamic, adLockOptimistic    
  23. End Sub