(Win NT 4.0 Sp 6; VS 6.0 Sp 5; Office 97)
I have an Access database that is used to send and receive data from a
Sybase database. Receiving data is not a problem, however sending the data
back to the server proved to be chalenging. This is how it goes:
If I use the Access File menu to link a table from Sybase and then run my
action query everything works fine. But if I use the ADOX to
programmatically link to the specific table and then run the action query I
get error (Can't update <field name>; field not updatable. Error 3113). This
is how I use ADOX to connect to target table:
Set objCatalog.ActiveConnection = mobjAccessCon
Set objTbl = New ADOX.Table
With objTbl
.ParentCatalog = objCatalog
.Name = "dbo_" & SERVICE_EVENT_TABLE
.Properties("Jet OLEDB:Create Link") = True
.Properties("Jet OLEDB:Link Provider String") = "ODBC;" & CON_STR &
gsUserName & ";PWD=" & gsPWD
.Properties("Jet OLEDB:Remote Table Name") = "dbo." &
SERVICE_EVENT_TABLE
End With
It is worth noting that I have check the property of this table in both
cases (when added manualy and when added programmatically) and everything
seems to be the same. Any help would be appriciated. Thanks