I have an existing Remote View into an Informix backend.
In general the Remote View works well for retrieving data. But now I want to dynamically modify the Remote View to temporarily enable Updates/Inserts to the backend.
I have the following code to modify the individual field Update Criteria parameters.
At this point if, for debug purposes, I go into the MODIFY VIEW &mcLeadView and actually look at the Remote View Update Criteria Tab page I can confirm that settings look as I would expect them to be.
Next...
* I USE the specific 'table' with the Default Buffering.
* I use the INSERT INTO <etc> command to insert a new record which appears OK if I confirm with a BROWSE on the View.
* I next issue a TABLEUPDATE()
* But when I do a REQUERY() to ensure the new record has actually been saved properly to the backend -- I get an error message.
No update tables are specified. Use the Tables property of the cursor.
What have I missed?
Unfortunately the error message is too generally worded to point me in the right direction.
Your advice or suggestions would be most appreciated.
Thanks,
JRB-Bldr
In general the Remote View works well for retrieving data. But now I want to dynamically modify the Remote View to temporarily enable Updates/Inserts to the backend.
I have the following code to modify the individual field Update Criteria parameters.
Code:
* -- Database Already OPEN Here --
* Remote View itself is NOT in USE yet
* mcLeadView = Name of Remote View
*
* -- Code To Modify Remote View Update Parameters --
SELECT FieldList && Ref Table containing View Field names
SCAN
mcFieldName = ALLTRIM(FieldList.FIELD)
DBSETPROP((mcLeadView + "." + mcFieldName), 'Field','UpDatable',.T.)
ENDSCAN
DBSETPROP(mcLeadView,'View','SendUpdates',.T.)
Next...
* I USE the specific 'table' with the Default Buffering.
* I use the INSERT INTO <etc> command to insert a new record which appears OK if I confirm with a BROWSE on the View.
* I next issue a TABLEUPDATE()
* But when I do a REQUERY() to ensure the new record has actually been saved properly to the backend -- I get an error message.
No update tables are specified. Use the Tables property of the cursor.
What have I missed?
Unfortunately the error message is too generally worded to point me in the right direction.
Your advice or suggestions would be most appreciated.
Thanks,
JRB-Bldr