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:
Option Explicit Public cnnLocation As ADODB.Connection Public rsLocation_Network As ADODB.Recordset Public strLocation_Network As String Public strApp_Path_Network As String Public Sub ADOLocation() Set cnnLocation = New ADODB.Connection Set rsLocation_Network = New ADODB.Recordset strConnectionLocation = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & App.Path & "\CALMS.mdb;" & _ "Persist Security Info=False" cnnLocation.ConnectionString = strConnectionLocation cnnLocation.Open strConnectionLocation strLocation_Network = "SELECT * FROM [Network]" rsLocation_Network.Open strLocation_Network, cnnLocation, adOpenDynamic, adLockOptimistic End Sub




Reply With Quote