I am working with a Progress database from Visual Basic 6.0 using the Merant ODBC driver. I am having problems doing any type of update query. Here is the piece of code I am working with:
Private Sub Form_Load()
Dim strCnn As String
Dim wrkODBC As Workspace
Dim cnn1 As Connection
Dim dbStores As Database
strCnn = "ODBC;DATABASE=instbase;UID= ;PWD= ;DSN=installbase"
Set wrkODBC = CreateWorkspace("NewODBCWorkspace", "admin", "", dbUseODBC)
Set dbStores = wrkODBC.OpenDatabase("installbase", dbDriverNoPrompt, , strCnn)
Set cnn1 = wrkODBC.OpenConnection("Connection1", dbDriverNoPrompt, , strCnn)
cnn1.Execute ("DELETE items.* FROM items")
cnn1.Close
dbStores.Close
wrkODBC.Close
End Sub
If I try to read, add or edit records in this database using a recordset object everything works fine. But when I run that code I get "Runtime error '3146' ODBC - call failed". This happens with any type of update query I try.
Dan
Private Sub Form_Load()
Dim strCnn As String
Dim wrkODBC As Workspace
Dim cnn1 As Connection
Dim dbStores As Database
strCnn = "ODBC;DATABASE=instbase;UID= ;PWD= ;DSN=installbase"
Set wrkODBC = CreateWorkspace("NewODBCWorkspace", "admin", "", dbUseODBC)
Set dbStores = wrkODBC.OpenDatabase("installbase", dbDriverNoPrompt, , strCnn)
Set cnn1 = wrkODBC.OpenConnection("Connection1", dbDriverNoPrompt, , strCnn)
cnn1.Execute ("DELETE items.* FROM items")
cnn1.Close
dbStores.Close
wrkODBC.Close
End Sub
If I try to read, add or edit records in this database using a recordset object everything works fine. But when I run that code I get "Runtime error '3146' ODBC - call failed". This happens with any type of update query I try.
Dan