Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you ROLLBACK a view
Message
From
09/03/1998 11:59:44
Edward Crawford
City Facilities Management
Glasgow, United Kingdom
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00082524
Message ID:
00083423
Views:
44
>>Right now I'm just trying get the base table to update, so I am typing the following at the command line:
>>
>>OPEN DATABASE Data
>>SELECT 0
>>USE TableA
>>SELECT 0
>>USE Data!ViewA
>>CURSORSETPROP("buffering", 5, "ViewA")
>>SELECT ViewA
>>INSERT INTO ViewA(Dnis) VALUES("Test")
>>TABLEUPDATE(2,.T., "ViewA")
>>
>>record is in view, but not in base table. TABLEUPDATE() returns F, AERROR() shows Error 1547, "Cannot insert an empty row from a view into its base table".
>>
>>Ed
>Ed,
>
>Is Dnis the primary key for the updatable view? You will get this error if the PK is blank.

Jim:

I just looked. It's a key made up of three fields. I went back into the view designer and checked all three of those fields under the key column of the update criteria. So every field is marked updatable, and those three fields are marked as key. The SQL Where group is set to key and updatable fields. Now all fields update in the base table with exception of the first field. It is blank. The view displays all fields properly.

Base Table:

DNIS DAY START_TIME END_TIME DEST

Key Key Key

Blank OK OK OK OK

I'm almost there, but not quite.

Ed
Previous
Reply
Map
View

Click here to load this message in the networking platform