Hi,
I'm trying to update via ODBC using a cursor as per
but when the curor moves off the current record to update I get Connectivity Error Invalid Keyword Specefication.
The current code I am using looks like...
CLOSE ALL
CLEAR ALL
CLEAR
OPEN DATABASE ('C:\Program Files\Opera II\data\comp_z')
CREATE CONNECTION "Sage Connector" DATASOURCE "SageLine50v11" USERID "MANAGER" PASSWORD ""
CLEAR
DISPLAY CONNECTIONS && Displays named connections in the database
STORE SQLCONNECT('Sage Connector', 'MANAGER', '') TO gnConnHandle
IF gnConnHandle <= 0
= MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
ELSE
= MESSAGEBOX('Connection made', 48, 'SQL Connect Message')
SQLSETPROP(gnConnHandle, 'asynchronous', .F.)
SQLEXEC(gnConnHandle, 'SELECT * FROM NOMINAL_LEDGER', 'Sage_Viewer')
t1= CURSORSETPROP("AllowSimultaneousFetch", .t., "Sage_Viewer")
t2= CURSORSETPROP("Tables","NOMINAL_LEDGER", "Sage_Viewer")
t3= CURSORSETPROP("KeyFieldList","Account_ref", "Sage_Viewer")
t4= CURSORSETPROP("UpdatableFieldList","Account_ref, Name", "Sage_Viewer")
t5= CURSORSETPROP("UpdateNameList","Account_ref NOMINAL_LEDGER.ACCOUNT_REF, Name NOMINAL_LEDGER.NAME", "Sage_Viewer")
t6= CURSORSETPROP("SendUpdates", .t., "Sage_Viewer")
BROWSE
= SQLDISCONNECT(gnConnHandle)
ENDIF
DELETE CONNECTION "Sage Connector" && Removes the connection just created
Basically I'm trying to read Sage Line 50 files into VFP, amend them through the browse window and send back the changed data. All the CURSORSETPROP calls return .t.
To be honest it's driving me mad !
Any one with better experience got any ideas ??
Many Thanks
Tim
I'm trying to update via ODBC using a cursor as per
but when the curor moves off the current record to update I get Connectivity Error Invalid Keyword Specefication.
The current code I am using looks like...
CLOSE ALL
CLEAR ALL
CLEAR
OPEN DATABASE ('C:\Program Files\Opera II\data\comp_z')
CREATE CONNECTION "Sage Connector" DATASOURCE "SageLine50v11" USERID "MANAGER" PASSWORD ""
CLEAR
DISPLAY CONNECTIONS && Displays named connections in the database
STORE SQLCONNECT('Sage Connector', 'MANAGER', '') TO gnConnHandle
IF gnConnHandle <= 0
= MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
ELSE
= MESSAGEBOX('Connection made', 48, 'SQL Connect Message')
SQLSETPROP(gnConnHandle, 'asynchronous', .F.)
SQLEXEC(gnConnHandle, 'SELECT * FROM NOMINAL_LEDGER', 'Sage_Viewer')
t1= CURSORSETPROP("AllowSimultaneousFetch", .t., "Sage_Viewer")
t2= CURSORSETPROP("Tables","NOMINAL_LEDGER", "Sage_Viewer")
t3= CURSORSETPROP("KeyFieldList","Account_ref", "Sage_Viewer")
t4= CURSORSETPROP("UpdatableFieldList","Account_ref, Name", "Sage_Viewer")
t5= CURSORSETPROP("UpdateNameList","Account_ref NOMINAL_LEDGER.ACCOUNT_REF, Name NOMINAL_LEDGER.NAME", "Sage_Viewer")
t6= CURSORSETPROP("SendUpdates", .t., "Sage_Viewer")
BROWSE
= SQLDISCONNECT(gnConnHandle)
ENDIF
DELETE CONNECTION "Sage Connector" && Removes the connection just created
Basically I'm trying to read Sage Line 50 files into VFP, amend them through the browse window and send back the changed data. All the CURSORSETPROP calls return .t.
To be honest it's driving me mad !
Any one with better experience got any ideas ??
Many Thanks
Tim