General information
Category:
Coding, syntax & commands
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only