PC Review


Reply
Thread Tools Rate Thread

Boolean won't insert if default is "true"

 
 
nick
Guest
Posts: n/a
 
      13th Feb 2004
Hi

What is the proper way of setting a boolean column (checkbox) to
"true" by default? It seems that the datagrid won't accept inserts if
the default is true.

BoolColPaid = new DataGridBoolColumn();
BoolColPaid.MappingName = "paid";
BoolColPaid.HeaderText = "paid";
BoolColPaid.FalseValue = false;
BoolColPaid.TrueValue = true;
BoolColPaid.AllowNull = false;
BoolColPaid.NullText = true.ToString();
BoolColPaid.NullValue = true;

Here's defining the dataset's paid column:
<xs:element name="paid" type="xs:boolean" minOccurs="0" />

Here's setting the paid column's default to true:
dataset1.Tables[0].Columns["paid"].DefaultValue = true;

I'm using Access database.
 
Reply With Quote
 
 
 
 
nick
Guest
Posts: n/a
 
      13th Feb 2004
On Fri, 13 Feb 2004 14:41:54 +1300, nick <(E-Mail Removed)> wrote:

>Hi
>
>What is the proper way of setting a boolean column (checkbox) to
>"true" by default? It seems that the datagrid won't accept inserts if
>the default is true.
>
>BoolColPaid = new DataGridBoolColumn();
>BoolColPaid.MappingName = "paid";
>BoolColPaid.HeaderText = "paid";
>BoolColPaid.FalseValue = false;
>BoolColPaid.TrueValue = true;
>BoolColPaid.AllowNull = false;
>BoolColPaid.NullText = true.ToString();
>BoolColPaid.NullValue = true;
>
>Here's defining the dataset's paid column:
><xs:element name="paid" type="xs:boolean" minOccurs="0" />
>
>Here's setting the paid column's default to true:
>dataset1.Tables[0].Columns["paid"].DefaultValue = true;
>
>I'm using Access database.


Sorry it was something else.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting the number of "True" values in a boolean column. =?Utf-8?B?TW9ua2V5X08=?= Microsoft Access Reports 3 13th Jul 2006 04:01 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB Microsoft Excel New Users 7 13th May 2006 10:02 PM
How do I insert a "true blank" into a cell? =?Utf-8?B?TW9uaXF1ZQ==?= Microsoft Excel Misc 4 13th Oct 2004 10:26 PM
Insert Picture from File -- How to set the default display format to "Details" instead of "Thumbnails" =?Utf-8?B?eGlhb2Fud2FuZw==?= Microsoft Word Document Management 7 14th Apr 2004 06:01 PM
Boolean won't insert if default is "true" nick Microsoft C# .NET 8 17th Feb 2004 05:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:30 AM.