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
Miscellaneous
Thread ID:
01014610
Message ID:
01015192
Views:
22
I havent tried this as yet but provided the structure of the cursor you create is the same as the CA's cursor I dont see why not. After all the CA does not keet its cursor name anywhere.

But first you need to CursorDetach after your CursorFill call before attaching(). Try and let us know.

>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
>
Previous
Reply
Map
View

Click here to load this message in the networking platform