Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't update updateable view
Message
From
16/04/2004 07:09:32
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00895413
Message ID:
00895471
Views:
19
>Hello everyone,
>
>MS SQL server. I have a table (MyTable) that has an ID field (MyId), and some other fields of course. I have created an updateable view of this table with the view designer in vfp8. I update the view, and try to tableupdate, but I get an error, something like:
>"Connectivity error: Cannot insert the value NULL into column MYID, table MYTABLE; column does not allow nulls."
>It wants me to revert the table. How do I update this table? Thanks a lot!
>
>jfh

Sounds like it doesn't have a default value on MS SQL side and in view designer is not marked as updatable.
Either have a default value defined on SQL server side or populate at VFP side and mark as updatable (check the one with a mark under keyfield).
From its name it looks like it's the key field. If so a surrogate autogenerated key (ie: a uniqueidentifier type) would be good.
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
Next
Reply
Map
View

Click here to load this message in the networking platform