Re: [sqlite] Preferred cast in C#

2014-07-15 Thread Edward Ned Harvey (sqlite)
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Simon Slavin > > Which does /not/ describe it as "The official SQLite database engine", which > is the point I was making. I used NuGet. http://www.nuget.org/packages/System.Data.SQLite.Core/ "The

Re: [sqlite] Preferred cast in C#

2014-07-15 Thread Edward Ned Harvey (sqlite)
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of RSmith > > > System.DBNull is not a native SQLite construct, it is probably one of the > third > party connectors. In C#, using the System.Data.Sqlite.Core package, which is described as "The

Re: [sqlite] Preferred cast in C#

2014-07-15 Thread Edward Ned Harvey (sqlite)
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Edward Ned Harvey (sqlite) > > I would really love to have an easy way of putting a long? into the database, > and then getting a long? back out. Maybe it exists and I'm just doing it

Re: [sqlite] Preferred cast in C#

2014-07-15 Thread Edward Ned Harvey (sqlite)
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Hick Gunter > > Why is the column nullable if you require a default value to be returned? The default value for long? or string or byte[] is null. Which makes perfect sense.

Re: [sqlite] Preferred cast in C#

2014-07-15 Thread Edward Ned Harvey (sqlite)
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Random Coder > > Could you not do something like this to handle the nullable types? > > T GetValue(string field) > { > object obj = reader[field]; > > if (obj is

Re: [sqlite] Preferred cast in C#

2014-07-15 Thread Edward Ned Harvey (sqlite)
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Joseph L. Casale > > > I would really love to have an easy way of putting a long? into the > > database, > and then getting a long? back out. > > What do you want to happen when the column is null

[sqlite] Preferred cast in C#

2014-07-14 Thread Edward Ned Harvey (sqlite)
I understand there are only 5 data types in Sqlite, and that the column type isn't necessarily the type of object returned in a query. Is there a more seamless way to cast responses than this? I would really love to have an easy way of putting a long? into the database, and then getting a