yiskang / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

String null values and DateTime.MinValue #81

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello.
I found some errors in your May release.

1. I think, it's not good idea to throw exception when I access to null string.
2. Empty string and null - different things!
3. If you store datetime as FileTime, you can't store DateTime.MinValue

I created the patch and think, that it is not neccessary to distinguish this 
problems.

Patch is attached.

Original issue reported on code.google.com by nikolay....@gmail.com on 24 Nov 2010 at 9:10

GoogleCodeExporter commented 8 years ago
Please recheck under 3.7.5 if this is still a problem

Original comment by noah.hart@gmail.com on 6 Mar 2011 at 11:45

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Yes, still repros in 3.7.5.

Create a database with a nullable nvarchar column.  *Omit* that column from the 
insert.  Then retrieve that column using the SqliteClient (not the native API).

SqliteDataReader.GetString will throw a NullReferenceException because it 
attempts to call ToString() on a null.

Original comment by tanza...@gmail.com on 7 Mar 2011 at 12:36

GoogleCodeExporter commented 8 years ago
This issue was closed by revision c30391deab.

Original comment by noah.hart@gmail.com on 7 Mar 2011 at 1:13

GoogleCodeExporter commented 8 years ago
@tanza -- it will simply return null now after the latest checkin

Original comment by noah.hart@gmail.com on 7 Mar 2011 at 1:14