Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field does not accept null values
Message
De
26/02/1998 10:15:44
 
 
À
26/02/1998 10:09:21
Steve Camsell
Windmill Associates
Bath, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00081366
Message ID:
00081370
Vues:
19
>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?

I think you can only update one side of the join - not both. You will probaby have to create the two records seperately.

Ian Russell
regards

Ian
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform