Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Null value
Message
From
24/03/2004 05:10:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/03/2004 23:16:39
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Title:
Miscellaneous
Thread ID:
00889115
Message ID:
00889153
Views:
18
>I use C# & VFP OLDBD Provider.
>
>My table have 4 field. When I insert a record to the table and only fill 2 field eg
>
>dataAdaptar.insertCommand.commandText = "insert into tableA (flda,fldb) values ('a','b')"
>
>C# prompt me error that fldC cannot accept null value. How to set C# insert empty value to the field did not specify in the insert command.
>
>
>Thanks.

Send :
Set null off
before insertion.

OleDbCommand cmd = cn.CreateCommand();
cmd.CommandText = "set null off";
cmd.ExecuteNonQuery();

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
Reply
Map
View

Click here to load this message in the networking platform