Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another CursorAdapter Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Another CursorAdapter Problem
Divers
Thread ID:
01014610
Message ID:
01014610
Vues:
75
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform