Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RI builder - what we had discovered
Message
From
01/04/2005 12:15:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01000705
Message ID:
01000719
Views:
33
>>I don't use the builder but I see that as developer's own error who sets an FK to allow nulls and yet restricts inserts. As someone said 'nulls are evils'.
>>Cetin
>>
>Cetin,
>
>Here is the scenario: when I'm scheduling a new account in the Employee_Queue_Schedules table, I have two FK fields. One is the cTrans_Employees_Queus_fk, which is the foreign key to the real parent table. This is always should be set to the correct value. The other FK is cDiary_Code_fk. In other words, when you re-schedule, you can put a "mental" note to youself or your colleagues about why you're re-scheduling this account. I don't want to use a dummy value on my original insert. I want to be able to have NULL here, yet I don't want to allow wrong values. I believe, this is the behavior for SQL Server. Also this is current behavior of the native RI builder because of its internal bug. So, I think, it should be up to developer to control NULL situation on a case by case basis.

No SQL server's behavior matches with what you think as a bug. IOW SQL server allows insert if the value is null.
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