Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table Not Updating (doh!)
Message
From
27/02/2003 05:03:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/02/2003 02:05:58
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00758607
Message ID:
00758641
Views:
15
>Please oh great and illustrious gurus...
>
>Help me figure this one out....
>
>I have a bunch of remote views (attached to MS SQL 2000) in a DBC. When I INSERT INTO an empty view or put changed data into a Remote View, I run an update routine that looks like this:
>
> = CURSORSETPROP("KeyFieldList", lc_key)&& "identity_column"
> = CURSORSETPROP("SendUpdates", .t., lc_file)
> = CURSORSETPROP("UpdatableFieldList", lc_flist, lc_file)
>
> ll_success = TABLEUPDATE(.T.)
>
> =CURSORSETPROP("SendUpdates", .f., lc_file)
>
>PROBLEM: Only ONE Remote View is not TABLUEUPDATE-ing well. It is based on a new SQL Table I added by hand via Enterprise Manager. When I added it the first time, I forced in a record and hand picked an identity_column number.
>
>When I couldn't get it working right, I sucked the data down to a VFP table, added a few records, dropped the existing identity_column and killed the table in SQL. I then upsized the table. I now have new identity_column numbers, but I still can't TABLEUPDATE.
>
>PS: I call rebuild all of the views dynamically via a routine when I kill the DBC they reside in. As a result all of the views are built exactly the same.
>
>Anybody have any ideas why just this one view is not working right?
>HHHHHHHHHHEEEEEEEEELLLLLLLLLLLLLLPPPPPPPPPPP!!!!

John,
Hard to tell with partial info. Might it be you don't have an UpdateNameList which contains also keyfield in it ?
I would create the remote view using designer then run gendbc to get code.
Try an sqlexec() and check aerror() why it's not updating.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform