Re: [sqlite] Help needed with query to tell a FK from a PK

2013-01-03 Thread nospam.nospam.nos...@gmail.com
On 4 January 2013 05:35, Petite Abeille wrote: > > On Jan 3, 2013, at 10:19 AM, nospam.nospam.nos...@gmail.com wrote: > >> I'm trying to create two queries so I can determine which of the keys >> for a given sqlite3 table is the primary key and which keys are >> foreign.

Re: [sqlite] How to verify referential integrity of SQLite database

2013-01-03 Thread Levi Haskell (BLOOMBERG/ 731 LEXIN)
Perfect! Exactly what I needed Thanks a lot, - Levi - Original Message - From: d...@sqlite.org To: LEVI HASKELL (BLOOMBERG/ 731 LEXIN) Cc: sqlite-users@sqlite.org At: Jan 1 2013 09:03:00 On Thu, Dec 27, 2012 at 11:43 AM, Levi Haskell (BLOOMBERG/ 731 LEXIN)

Re: [sqlite] Help needed with query to tell a FK from a PK

2013-01-03 Thread Petite Abeille
On Jan 3, 2013, at 10:19 AM, nospam.nospam.nos...@gmail.com wrote: > I'm trying to create two queries so I can determine which of the keys > for a given sqlite3 table is the primary key and which keys are > foreign. pragma table_info() returns a 'pk' attribute. You can use that to identify the

Re: [sqlite] Mapping Sqlite INTEGER field to C# Nullable

2013-01-03 Thread Simon Slavin
On 3 Jan 2013, at 6:11pm, Simon Slavin wrote: > On 3 Jan 2013, at 5:29pm, Quanren Xiong wrote: > >> Just curious. Do you know how the Visual Studio Designer works? >> In designer, the Null value is converted to 0. > > In SQL null is not 0. 'null'

Re: [sqlite] Mapping Sqlite INTEGER field to C# Nullable

2013-01-03 Thread Simon Slavin
On 3 Jan 2013, at 5:29pm, Quanren Xiong wrote: > Just curious. Do you know how the Visual Studio Designer works? > In designer, the Null value is converted to 0. In SQL null is not 0. 'null' means 'value missing' or 'value unknown'. It is closer to NaN = NotANumber.

Re: [sqlite] Help needed with query to tell a FK from a PK

2013-01-03 Thread danap
> Hi, > > I'm a complete sql novice so please go easy :) > > I'm trying to create two queries so I can determine which of the keys > for a given sqlite3 table is the primary key and which keys are > foreign. Hello, I did not fully review your question detail, but perhaps this may help. The

Re: [sqlite] Mapping Sqlite INTEGER field to C# Nullable

2013-01-03 Thread Rob Richardson
Seems like a strange thing for VS Designer to do. NULL is not 0. RobR -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Quanren Xiong Sent: Thursday, January 03, 2013 12:30 PM To: General Discussion of SQLite Database

Re: [sqlite] Mapping Sqlite INTEGER field to C# Nullable

2013-01-03 Thread Quanren Xiong
Hi Joe, Just curious. Do you know how the Visual Studio Designer works? In designer, the Null value is converted to 0. I would like to something similar. Thanks -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe

Re: [sqlite] Mapping Sqlite INTEGER field to C# Nullable

2013-01-03 Thread Joe Mistachkin
Quanren Xiong wrote: > > I mapped a Sqlite INTEGER field to a C# Nullable property in EF 5.0. > > When the field is NULL, Visual Studio throws exception with following info: > The method throwing the exception (System.Data.SQLite.SQLiteDataReader.GetInt64) does not attempt to automatically

Re: [sqlite] SQLiteConnection.State Property w/ v1.0.83.0 Changed

2013-01-03 Thread Joe Mistachkin
Denis Burke wrote: > > Moving from v1.0.81.0 to v1.0.83.0 (no code changes on my part), results in > a change in reported state from the SQLiteConnection.State property. > The change causing the behavior you are seeing was made in release 1.0.82.0. Prior to that release, opening a connection

[sqlite] Mapping Sqlite INTEGER field to C# Nullable

2013-01-03 Thread Quanren Xiong
Hi All, I mapped a Sqlite INTEGER field to a C# Nullable property in EF 5.0. When the field is NULL, Visual Studio throws exception with following info: -***- Message "Specified cast is not valid." string

Re: [sqlite] Help needed with query to tell a FK from a PK

2013-01-03 Thread Clemens Ladisch
nospam.nospam.nos...@gmail.com wrote: > I'm trying to create two queries so I can determine which of the keys > for a given sqlite3 table is the primary key SQLite does not give you this information. PRAGMA index_list gives you only indexes, but if the primary key is the ROWID, there is no

[sqlite] Help needed with query to tell a FK from a PK

2013-01-03 Thread nospam.nospam.nos...@gmail.com
Hi, I'm a complete sql novice so please go easy :) I'm trying to create two queries so I can determine which of the keys for a given sqlite3 table is the primary key and which keys are foreign. I understand that sqlite's pragmas aren't queryable so I have some code that moves the result set

[sqlite] SQLiteConnection.State Property w/ v1.0.83.0 Changed

2013-01-03 Thread Denis Burke
Moving from v1.0.81.0 to v1.0.83.0 (no code changes on my part), results in a change in reported state from the SQLiteConnection.State property. I could not find any documentation/bug fixes which indicates that this is an expected change. Background info: Vb.net app, .NET 3.5SP1, VS 2010,

Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command

2013-01-03 Thread Marco ten Thije
On 12/21/2012 05:18 PM, Dan Kennedy wrote: Thanks. I think it's this: http://www.sqlite.org/src/info/0cfd98ee20 Dan. You are right. I have been re-reading our mail thread and this is exactly what happens. I have build a SQLite version from the latest version in the archive (3.7.16) and