Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorAdapter Class
Message
From
16/10/2002 12:48:42
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00711726
Message ID:
00711828
Views:
10
Mark,

Thank you so much! That made the difference. I was missing 3 properties.

>There are many parameters that have to be just right for the update to work. I am testing against a Stonefield meta table called SDTMeta. My settings for the CursorAdaptor are as follows:
>Alias = 'crsSDTMeta'
>DataSource = 'SDTMeta'
>DataSourceType = 'Native'
>KeyFieldList = 'RecType,ObjectName'
>Name = 'adpSDTMeta'
>SelectCmd = 'select * from sdtmeta'
>Tables = 'SDTMeta'
>UpdatableFieldList = 'PCSName'  && my own custom field in this table
>UpdateNameList = 'rectype sdtmeta.rectype,objectname sdtmeta.objectname,';
>               + 'pcsname sdtmeta.pcsname'
>WhereType = 1
>Then when I issue a TABLEUPDATE(), the change to the PCSName field gets posted back to the source table.
>
>Amendment: You also need to specify paths to the table for the DataSource and SelectCmd props if the table is not in a search path.
>
>>I am currently testing CursorAdapter class and have some issues and was wondering if anyone else has run across the same things.
>>
>>The ODBC connection with SQL server is wonderful. I really like that.
>>
>>The problem comes when I use a Native connection with VFP tables.
>>
>>1. I ran the sample code from Devcon against Northwind dbf tables and the result is two cursors/tables in the data session. The first one was customers, the second was A. When I ran the same code using ODBC for Northwind on SQL server, I only had Customers and that was equivalent to A from the Native test I ran. So my problem is that my results are different names, and I could not figure out how to fix that.
>>
>>2. When I did a replace in the result with the ODBC connection to SQL server, it worked great and updated SQL Server. When I attempted the same thing with Native, it did not update.
>>
>>Can anyone help? What am I missing? I figure that there must be a different property or method that I am missing, but I just cannot find it.
>>
>>Thank you in advance for any guidance!
>>
>>Susan
Previous
Reply
Map
View

Click here to load this message in the networking platform