
Delete and Update-problems with ODBC
Hello,
I have a problem with updating and deleting records via ODBC in Visual
Basic.
Im using an Oracle 7.3 database with 32-bit ODBC.
The following methods work for my recordset :
.MoveNext
.AddNew followed by .Update
The following methods dont work :
.MoveFirst
.Delete
.Edit followed by .Update
The error I receive is:
- ODBC call failed. (Error 3146).
The recordset is constructed like this:
Dim MainWS As Workspace
Dim dbTemp As Database
Dim sDAOConnect As String
Dim rscompany As Recordset
sDAOConnect = "ODBC;DSN=namedb;UID=userid;PWD=password;Database=namedb"
Set MainWs = CreateWorkspace("ODBCWorkspace", "admin", _
"", dbUseODBC)
Set dbTemp = MainWS.OpenDatabase("COMPANY", _
dbDriverNoPrompt, False, sDAOConnect)
Set rscompany = CodaDB.OpenRecordset("SELECT * FROM COMPANY", _
dbOpenDynamic, 0, dbOptimistic)
----------------------------------------------------------------------
Please email me if you have an idea what could be the problem.
Eric.
----------------------------------------------------------------------