Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to save changes using cursoradapters
Message
From
28/09/2004 12:13:36
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00946708
Message ID:
00946756
Views:
17
>You must use TableUpdate() for CA too. Bur as Lisa said You must describe ALL updatable fields in oCA.UpdateNameList & oCA.UpdateableFieldList
>

Thanks, I'll give it a try.

>>Hi all,
>>
>>Is saving of data using CursorAdapter (ADO) implicit based the relevant CA properties? See example:
>>
>>* assume CA is valid and returns a cursor: Temp_.whse, Temp_.prod, Temp_.Inv .
>>set multilocks on
>>oCA.tag = "Provider=VFPOLEDB.1;Data Source=DATAFILE;Password='';Collating Sequence=MACHINE;"
>>oCA.datasourcetype = "ADO"
>>oCA.flags = 0
>>oCA.fetchasneeded = .t.
>>oCA.prepared = .f.
>>oCA.updatecmddatasource = "ADO"
>>oCA.selectcmd = "SELECT * FROM Whseprods WHERE Whse = ?cWhse and Prod = ?cProd"
>>oCA.KeyFieldList = "WHSE, PROD"
>>oCA.UpdateNameList = "WHSE Whseprods.Whse, PROD Whseprods.prod, CALCDEPLOY Whseprods.Calcdeploy"
>>oCA.UpdatableFieldList = "CALCDEPLOY"
>>oCA.Tables             = "Whseprods"
>>oCA.SendUpdates        = .T.
>>cWhse = "W1"
>>cProd = "P1"
>>oCA.RefreshCursor()
>>replace temp_.inv with 100
>>skip && is the record updated back to the base table here?
>>* with views I can issue a TABLEUPDATE() to send the updates, is there something I have to call?
>>
>>
>>My updates are not sent back to the table.
ramil
~~ learning to stand still
Previous
Reply
Map
View

Click here to load this message in the networking platform