Re: [sqlite] Problem with SQLite in BCB 4

2010-03-10 Thread Chimerian
Correction: I didnt delete this one ;) Database::Database(char* filename) { ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Problem with SQLite in BCB 4

2010-03-10 Thread Chimerian
Solved. I found very interesting post on forum http://marc.info/?l=sqlite-users&m=117751256117132&w=2 So... I deleted some part of code: unit1.cpp: // DLL handle HANDLE DLLHandle = LoadLibrary("sqlite3.dll"); // SQLite class Database::Database(char* filename) { sqlite3_open = (int (__cd

Re: [sqlite] Problem with SQLite in BCB 4

2010-03-09 Thread a1rex
Thank you very much for your clarification! This is what I suspected. Regards, Samuel - Original Message From: Igor Tandetnik a1rex wrote: > What about void *p = sqlite3_column_blob()? > From my tests it looks that pointer p survives sqlite3_finalize(). > Is it just a coincidence?

Re: [sqlite] Problem with SQLite in BCB 4

2010-03-09 Thread Igor Tandetnik
a1rex wrote: > What about void *p = sqlite3_column_blob()? > From my tests it looks that pointer p survives sqlite3_finalize(). > Is it just a coincidence? It "survives" in the same sense as in this example: char* p = (char*)malloc(10); strcpy(p, "Hello"); free(p); printf(p); Chances are high

Re: [sqlite] Problem with SQLite in BCB 4

2010-03-08 Thread a1rex
- Original Message >From: Simon Davies >The return from sqlite3_column_text is not valid after subsequent calls to any >of >sqlite3_step/sqlite3_reset/sqlite3_finalize. Yes. What about void *p = sqlite3_column_blob()? >From my tests it looks that pointer p survives sqlite3_finali

Re: [sqlite] Problem with SQLite in BCB 4

2010-03-08 Thread a1rex
>> 2010/3/6 Chimerian : >> values.push_back((char*)sqlite3_column_text(statement, col)); >> // HERE IS ERROR ! >From: Simon Davies >What error? >I can not see why THIS line should provoke any error; This line will produce a runtime error when sqlite3_column_text(statement, col); returns NULL p

Re: [sqlite] Problem with SQLite in BCB 4

2010-03-08 Thread Simon Davies
2010/3/6 Chimerian : > I have a problem with SQLite in BCB 4.0. I wrote my own application - > I found very useful information on > http://www.dreamincode.net/forums/index.php?showtopic=122300 > > On form (Form1) I have: Memo1 and Button3. > > File Unit1.cpp: > > . . . .>                        

Re: [sqlite] Problem with SQLite in BCB 4

2010-03-08 Thread a1rex
-users@sqlite.org >Sent: Mon, March 8, 2010 12:18:53 PM >Subject: Re: [sqlite] Problem with SQLite in BCB 4 >Unfortunately I cant print the value of val before it's pushed to the >values vector because when do that I got this same error - I think >the problem is with po

Re: [sqlite] Problem with SQLite in BCB 4

2010-03-08 Thread Chimerian
Unfortunately I cant print the value of val before it's pushed to the values vector because when do that I got this same error - I think the problem is with pointer: char * ptr = (char*)sqlite3_column_text(statement, col); Maybe it hold wrong address ? I compile this code on Borland C++ Builder 6

Re: [sqlite] Problem with SQLite in BCB 4

2010-03-07 Thread a1rex
te.org Sent: Sun, March 7, 2010 4:23:30 PM Subject: Re: [sqlite] Problem with SQLite in BCB 4 Unfortunately it still doesn't work. I have error in line values.push_back(val); I tried to run program on Windows XP - I have this same error. Links to error screens: http://chimerian.net/error1.jpg

Re: [sqlite] Problem with SQLite in BCB 4

2010-03-07 Thread Chimerian
Unfortunately it still doesn't work. I have error in line values.push_back(val); I tried to run program on Windows XP - I have this same error. Links to error screens: http://chimerian.net/error1.jpg http://chimerian.net/error2.jpg if(result == SQLITE_ROW)

Re: [sqlite] Problem with SQLite in BCB 4

2010-03-06 Thread a1rex
You cannot push_back(NULL) null pointer. Fix is below: if(result == SQLITE_ROW) { vector values; for(int col = 0; col < cols; col++) {