Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another CursorAdapter Problem
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Another CursorAdapter Problem
Miscellaneous
Thread ID:
01014610
Message ID:
01014610
Views:
74
Can I open a table, create a CA, and update the base tables using it, even
if I didn't get the data through the CA?

Here's my code, which doesn't work:
CLOSE DATABASES all
local oCursor as CursorAdapter, aErrors[1]

SELECT 0
use	d:\projects\testdata\smts\syserrors

SELECT 0
use	Temp
cursorsetprop("buffering", 5)

oCursor = CREATEOBJECT("CursorAdapter")

with oCursor

   .Alias              = "errdata"
   .BufferModeOverride = 5
   .DataSourceType     = "Native"
   .SelectCmd          = "select * from syserrors"
   .KeyFieldList       = "recordid"
   .Tables             = "syserrors"
   .UpdatableFieldList = "recordid, error, line"
   .UpdateNameList     = "recordid syserrors.recordid, error syserrors.error, line syserrors.line"

   if .CursorFill()

		.CursorAttach("Temp", .T.)
		
		SELECT Temp
     TABLEUPDATE(1)

   else

     aerror(aErrors)
     messagebox(aErrors[2])

   endif

endwith

RETURN
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform