Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field does not accept null values
Message
From
26/02/1998 10:09:21
Steve Camsell
Windmill Associates
Bath, United Kingdom
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Field does not accept null values
Miscellaneous
Thread ID:
00081366
Message ID:
00081366
Views:
60
This is probably extremely basic: I am trying to create a new customer. A customer consists of two records at the back end, one called Customer and one called PsnlDets (as in Personal Details). They have a 1 to 1 relationship and are joined by iCust_id.

I have therefore created a view which joins the two records together, and I have made this updateable. The SQL for the view is as follows:
SELECT Customer.icust_id, Customer.csearchname, Customer.cacct_ref,;
  Customer.lmailpref, Customer.ccredit_info, Customer.mnotes,;
  Customer.lcorp_indiv, Customer.ycredit_limit, Customer.ycredit_balance,;
  Customer.icurrency, Customer.istatus, Customer.ivat_status,;
  Customer.drec_added, Psnldets.icust_id, Psnldets.lgender,;
  Psnldets.ctitle, Psnldets.csurname, Psnldets.ddob, Psnldets.drec_added,;
  Customer.imedia_id, Psnldets.cforenames;
 FROM customer Customer, psnldets Psnldets;
 WHERE Customer.icust_id = Psnldets.icust_id;
   AND Customer.icust_id = ?pnCust_id
I key in any value for a pnCust_id and then add a new record to the view. When I try to commit my new record, I get the following error :
Connectivity error: [Microsoft][ODBC Visual FoxPro Driver]Field iCust_id does not accept null values.
Even when I populate the iCust_id field in the view I still get the same error. Can anyone tell me what is going on here, or preferably, whether I am going about this the wrong way?
Steve Camsell
Development Consultant
Steve.Camsell@Windmill-DBM.Co.Uk
Next
Reply
Map
View

Click here to load this message in the networking platform