Hi,
I'm trying to connect to an SQl recordset and update some columns I can connect to the server and return a recordset but I can't update it as its read only any ideas on how to get it read write?
Heres my code:
To connect:
Set wrkODBC = CreateWorkspace("NewODBCWorkspace", "admin", "", dbUseODBC)
Set conHolODBC = wrkODBC.OpenConnection("CMSCon", , False, "ODBC;DSN=Holiday;Description=Holiday;APP=Microsoft® Access;WSID=" & Environ$("computername") & ";DATABASE=Annual Leave;Trusted_Connection=Yes")
to return recordset:
strSQL = "SELECT * FROM AGENT_AVAILABILITY WHERE VACATION_YEAR=" & strDate & " AND AGENT_ID=" & lngAgentID
Set rs = conHolODBC.OpenRecordset(strSQL, dbOpenDynaset)
Any ideas would be appreaciated.
Thanks
I'm trying to connect to an SQl recordset and update some columns I can connect to the server and return a recordset but I can't update it as its read only any ideas on how to get it read write?
Heres my code:
To connect:
Set wrkODBC = CreateWorkspace("NewODBCWorkspace", "admin", "", dbUseODBC)
Set conHolODBC = wrkODBC.OpenConnection("CMSCon", , False, "ODBC;DSN=Holiday;Description=Holiday;APP=Microsoft® Access;WSID=" & Environ$("computername") & ";DATABASE=Annual Leave;Trusted_Connection=Yes")
to return recordset:
strSQL = "SELECT * FROM AGENT_AVAILABILITY WHERE VACATION_YEAR=" & strDate & " AND AGENT_ID=" & lngAgentID
Set rs = conHolODBC.OpenRecordset(strSQL, dbOpenDynaset)
Any ideas would be appreaciated.
Thanks