Hi!
I am using VB6.0, Microsoft DAO3.51 Object Libraray and the ODBC Driver
Sybase SQL Anywhere 5.0
I have a problem writing to a database using this peace of code:
************CODE BEGIN******************************************************
Dim MyDatabase As Database
Dim sSQL As String
Dim lX As Long
Set MyDatabase = DBEngine.Workspaces(0).OpenDatabase(csDefaultDB, False,
False, "ODBC; DSN = " & "GENESIS DATA WATCOM 32")
lX = 3647
sSQL = "UPDATE WtabCarr SET XCarrierPos=" & Format(lX) & " WHERE
CarrierID='" & "Carrier_1" & "' AND WorktableID='" & "Worktable1" & "'"
MyDatabase.Execute (sSQL) ' <<<<<<<<RT ERRROR 3073 SHOWS HERE
MyDatabase.Close
Set MyDatabase = Nothing
************CODE END******************************************************
Error message is: Run-time error '3073' Operation must use an updatable
query.
The database file is on my hard disk and I have administrator rights on my
computer so I have all the rights for the database file. Beside, another
application (whose source code I don't have) can write the same data.
I have checked the MSDN and different sites on this, but could not find any
solution. The problem was reported more then once in newsgroups but there
was no solution I could use.
Any ideas?
Best regards,
Goran