I need to add and delete data in oracle table from VB app. Here is my code:
*************************************
Dim cnn As ADODB.Connection
Dim rsIhdaDoc1 As ADODB.Recordset
Set cnn = New ADODB.Connection
cnn = "Provider=MSDAORA;Password=password;User ID=userid;Data Source=test;Persist Security Info=True"
cnn.Open
Set rsIhdaDoc1 = New ADODB.Recordset
rsIhdaDoc1.LockType = adLockOptimistic
rsIhdaDoc1.CursorType = adOpenDynamic
rsIhdaDoc1.Open "IHDA_DOC", cnn, , , adCmdTable
rsIhdaDoc1.AddNew
With rsIhdaDoc1
.........
rsIhdaDoc1.Update
End With
**********************************************
It stops at AddNew and gives me a message "Runtime error 3251. Current recordset doesn't support updating. This may be the limitation of the provider or selected locktype"
Can somebody tell me what should I do to make it updateable? Thanks.
*************************************
Dim cnn As ADODB.Connection
Dim rsIhdaDoc1 As ADODB.Recordset
Set cnn = New ADODB.Connection
cnn = "Provider=MSDAORA;Password=password;User ID=userid;Data Source=test;Persist Security Info=True"
cnn.Open
Set rsIhdaDoc1 = New ADODB.Recordset
rsIhdaDoc1.LockType = adLockOptimistic
rsIhdaDoc1.CursorType = adOpenDynamic
rsIhdaDoc1.Open "IHDA_DOC", cnn, , , adCmdTable
rsIhdaDoc1.AddNew
With rsIhdaDoc1
.........
rsIhdaDoc1.Update
End With
**********************************************
It stops at AddNew and gives me a message "Runtime error 3251. Current recordset doesn't support updating. This may be the limitation of the provider or selected locktype"
Can somebody tell me what should I do to make it updateable? Thanks.