<i><font color="#663300">I am having a problem constructing business objects based upon free tables.
cBizObj saves changes the datasource cursor by calling up the hierarchy to cDataBehavior.save() which in turn relies upon .CheckForUpdateConflicts() and .ConflictCheck(). In the latter method, a call is made to native VFP routine Refresh(), which results in an Error #1491. Apparently this is because the cursor is not formed from an SQL query.
The CB error handler does a nice job of trapping this error, and the changes are in fact saved to the table. However...
I dont' see any attempt, anywhere in the Save() process, to test the datasource to prevent this error. Wouldn't this also break if I were using a view based on local tables? Am I missing it?
My proposed solution is to perform a CURSORGETPROP() test in my bizobj method, and then pass thru only if required. Comments anyone? </font></i>
I noticed that problem too. I've just copied the method to the ilevel, adding nodefault at the top and then I replaced:
REFRESH()
by:
IF CURSORGETPROP("SOURCETYPE") # DB_SRCTABLE REFRESH() ENDIF
©2001 Philippe Sevin |