Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using CursorAdapter() but no update
Message
From
28/04/2003 19:15:08
 
 
To
28/04/2003 19:06:58
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00782518
Message ID:
00782529
Views:
18
>You need to set the UpdateNameList property as well.

Thanks, I did do as you suggested and ended up with this message when I try to modify that field:

No key columns are specified for the update table 'News'. Use the KeyFieldList property of the cursor.

Here's the code:
LOCAL loCursorAdapter
loCursorAdapter=CREATEOBJECT('CursorAdapter')
loCursorAdapter.DataSourceType='ODBC'
loCursorAdapter.DataSource=SQLSTRINGCONNECT('Driver=SQL server;Server=MyServer; Database=MyDatabase')
loCursorAdapter.SelectCmd='select * from news'
loCursorAdapter.Tables='News'
loCursorAdapter.KeyFieldList='Numero'
loCursorAdapter.UpdatableFieldList='AddUser'
loCursorAdapter.UpdateNameList='AddUser News.AddUser'
loCursorAdapter.CursorFill()
BROWSE
I still also do not understand why we have to specific other properties to specify the list of fields for update when we already did so by the use of UpdatableFieldList.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform