Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Allowing NULL's in a view's columns
Message
From
18/03/1999 17:52:28
Mike Siemers
Southwest Student Services
Mesa, Arizona, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00199318
Message ID:
00199516
Views:
20
>Mike,
>
>Is there a reason you want to allow nulls in the view when they can't be saved to the database? It doesn't seem like a good idea to allow data into views that can't be saved back to the underlying table. Maybe if you explain what you're trying to do someone can suggest a workaround.
>


The idea is to force the users to enter data into certain view columns. When a user adds a new row to the view, I would like to populate all the columns with NULL's. Then when the user attempts to write that new row to the SQL Server table, SQL Server would not do the INSERT if any columns are NULL that are not allowed to be. My application would then take the error returned by the server and display it to the user.

If the view does not allow NULL's in those columns, the default value for a character-type column will be empty spaces and the default value for a numeric or integer column will be zero. I have thought of ways to work with this, such as checking character columns which are not allowed to be NULL, and returning an error if they are empty, but this is really not my preference.
Previous
Reply
Map
View

Click here to load this message in the networking platform