Re: [sqlite] sqlite3_bind_text problem

2008-11-18 Thread MikeW
Matthew Allen <[EMAIL PROTECTED]> writes: > There may be another variable that I didn't mention in my first post, and that is I'm compiling sqlite using > Visual C++ 6 on windows atm and maybe there is a problem that only shows up in VC6 and not in gcc. So with that in > mind I'm building the Mac

Re: [sqlite] sqlite3_bind_text problem

2008-11-16 Thread Igor Tandetnik
"Matthew Allen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://www.memecode.com/temp/Sqlite_Test.zip [921kb] #define SERIALIZE_STR(Var, Col) \ if (Write) \ { \ (1) if (Var) \ (2) if (!Check(sqlite3_bind_text(Stmt, Col+1, (const char*)Var, -1, SQLITE_STATIC))) \

Re: [sqlite] sqlite3_bind_text problem

2008-11-16 Thread Matthew Allen
-- Original Message -- To: (sqlite-users@sqlite.org) From: Igor Tandetnik ([EMAIL PROTECTED]) Subject: Re: [sqlite] sqlite3_bind_text problem Date: 14/11/2008 11:47:54p > > And it return SQLITE_OK, however the value in the DB is NULL, or an > > empty string. > &g

Re: [sqlite] sqlite3_bind_text problem

2008-11-14 Thread Eric Minbiole
> I'm compiling sqlite using Visual C++ 6 on windows atm and maybe there is a > problem that only shows up in VC6 and not in gcc. So with that in mind I'm > building the Mac port of my software (which is built using gcc) and try to > reproduce the problem there. I guess if everything is perfect

Re: [sqlite] sqlite3_bind_text problem

2008-11-14 Thread Matthew Allen
> > And it return SQLITE_OK, however the value in the DB is NULL, or an > > empty string. > > How do you determine this? I open the sqlite db in Sqlite database browser and the field is empty. All the other int fields are there and correct. > I don't see any obvious problems in the code you've

Re: [sqlite] sqlite3_bind_text problem

2008-11-14 Thread Eric Minbiole
> Then a bind the values to that statement and write it to the DB. That all > works except for the TEXT field "Name". I'm calling sqlite3_bind_text like > this: > > char *Name = "Something"; > sqlite3_bind_text(Stmt, 3, (const char*)Name, -1, SQLITE_STATIC); > > And it

Re: [sqlite] sqlite3_bind_text problem

2008-11-14 Thread Igor Tandetnik
"Matthew Allen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a table with the following fields: > > {"Id", "INTEGER PRIMARY KEY AUTOINCREMENT"}, > {"ParentId", "INTEGER"}, > {"Name", "TEXT"}, > {"Unread", "INTEGER"}, > {"Open", "INTEGER"}, > {"ItemType", "INTEGER"}, >

[sqlite] sqlite3_bind_text problem

2008-11-14 Thread Matthew Allen
I have a table with the following fields: {"Id", "INTEGER PRIMARY KEY AUTOINCREMENT"}, {"ParentId","INTEGER"}, {"Name","TEXT"}, {"Unread", "INTEGER"}, {"Open","INTEGER"},