vijirams / csharp-sqlite

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

Missing types - Guid #60

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Guids cannot be saved
Possible solution:

In SqliteCommand:

else if (ptype.Equals(typeof(Guid)))
                {
                    err= (SqliteError)Sqlite3.sqlite3_bind_text(pStmt, i, param.Value.ToString(), param.Value.ToString().Length, null);
                }

Original issue reported on code.google.com by RobAshto...@gmail.com on 7 Jun 2010 at 10:15

GoogleCodeExporter commented 8 years ago
What is the line or code segment that is before and after your change?

Original comment by noah.hart@gmail.com on 7 Jun 2010 at 10:59

GoogleCodeExporter commented 8 years ago
It's just the big list of types and mappings - Line 326 along side

else if (ptype.Equals (typeof (Byte[]))) 
                {
                    err = (SqliteError)Sqlite3.sqlite3_bind_blob(pStmt, i, (byte[])param.Value, ((byte[])param.Value).Length, null);
                }

I don't know if string is the right choice, but it seems to work with all of my 
tests (I'm currently converting across from un-managed SQLite ala 
http://codeofrob.com/archive/2010/06/07/nhibernate-csharp-sqlite.aspx )

Original comment by RobAshto...@gmail.com on 7 Jun 2010 at 11:02

GoogleCodeExporter commented 8 years ago
Changes added; Pushed in 
changeset:   69:d051d1dc0568
date:        Mon Jun 07 18:07:39 2010 -0700

Original comment by noah.hart@gmail.com on 8 Jun 2010 at 1:08

GoogleCodeExporter commented 8 years ago

Original comment by noah.hart@gmail.com on 8 Jun 2010 at 1:39