Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with entityframework

2012-04-19 Thread Marc L. Allen
Yeah. I realized that, but my messages got reversed. Thanks. On Apr 19, 2012, at 4:51 PM, "Black, Michael (IS)" wrote: > You are correct that non-zero will be treated as true. > > That's more an accident then anything else as everybody is checking "!= 0" > for true. > > > > But the valu

Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with entityframework

2012-04-19 Thread Nico Williams
On Thu, Apr 19, 2012 at 3:51 PM, Black, Michael (IS) wrote: > You are correct that non-zero will be treated as true. > > That's more an accident then anything else as everybody is checking "!= 0" > for true. No, C treats any non-zero value as true, as in "if (condition) ..." -- that condition wi

Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with entityframework

2012-04-19 Thread Black, Michael (IS)
You are correct that non-zero will be treated as true. That's more an accident then anything else as everybody is checking "!= 0" for true. But the values need to be consistent in the "not" cases too if you want to be safe about it. As I demonstrated in the code. You want this to hold tru

Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with entityframework

2012-04-19 Thread Jay A. Kreibich
On Fri, Apr 20, 2012 at 04:41:46AM +1000, John scratched on the wall: > On 19/04/2012 5:14 AM, Jay A. Kreibich wrote: > > The type "BOOLEAN" will pick up a numeric affinity, but I can't see > > that being an issue. Most Boolean values are stored as integer 0 or > > 1 (in fact, SQLite has op

Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with entityframework

2012-04-19 Thread Marc L. Allen
I was under the impression that, in C, 0 was false, non-zero was true. > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Black, Michael (IS) > Sent: Thursday, April 19, 2012 3:15 PM > To: General Discussion of SQLite Datab

Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with entityframework

2012-04-19 Thread Marc L. Allen
Oh, nevermind I see what you're saying. > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Black, Michael (IS) > Sent: Thursday, April 19, 2012 3:15 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlit

Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with entityframework

2012-04-19 Thread Black, Michael (IS)
Problem with true=-1. !false=1 So !false == true fails which can bite you in the behind unexpectedly true= 1 !true=0 true=-1 !true=0 !false=1 (true= 1 == !false) = 1 (true=-1 == !false) = 0 #include main() { int true1=1; int true2=-1; int false=0;

Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with entityframework

2012-04-19 Thread John
On 19/04/2012 5:14 AM, Jay A. Kreibich wrote: On Wed, Apr 18, 2012 at 04:09:21PM +, Black, Michael (IS) scratched on the wall: Good to know... But why would his ADO be giving back NULL? Unless it has bastardized the sqlite interface? That would be my guess. And I guess that means t

Re: [sqlite] type-o on http://www.sqlite.org/download.html

2012-04-19 Thread Richard Hipp
On Thu, Apr 19, 2012 at 11:17 AM, Adam DeVita wrote: > Good day, > > This sentence on http://www.sqlite.org/download.html > Visit the System.Data.SQLite.org website > and especially the download > page

[sqlite] type-o on http://www.sqlite.org/download.html

2012-04-19 Thread Adam DeVita
Good day, This sentence on http://www.sqlite.org/download.html Visit the System.Data.SQLite.org website and especially the download pagefor source code an binaries of SQLite for .NET is missin