Re: [sqlite] sqlite3_prepare_v2 with an empty statement.

2018-07-24 Thread Dan Kennedy
On 07/24/2018 09:05 PM, Peter Da Silva wrote: In the documentation for sqlite3_prepare_v2, it says: *ppStmt is left pointing to a compiled prepared statement that can be executed using sqlite3_step(). If there is a

[sqlite] sqlite3_prepare_v2 with an empty statement.

2018-07-24 Thread Peter Da Silva
In the documentation for sqlite3_prepare_v2, it says: *ppStmt is left pointing to a compiled prepared statement that can be executed using sqlite3_step(). If there is an error, *ppStmt is set to NULL. If the input t

Re: [sqlite] sqlite3_prepare_v2() causing Address-out-of-Bounds error

2012-11-15 Thread Simon Slavin
On 15 Nov 2012, at 11:16pm, Rajeev Sharma wrote: > Could someone please let me know whether this is a known issue or whether it > has already been fixed? Which operating system. If Windows, are you using 64-bit or 32-bit ? Are you calling the C API directly or using a pre-made library ? Wha

[sqlite] sqlite3_prepare_v2() causing Address-out-of-Bounds error

2012-11-15 Thread Rajeev Sharma
Hello, We recently upgraded our SQLite library to 3.7.14.1 and we are seeing that sqlite3_prepare_v2 function is throwing a segmentation fault with pzTail being address-out-of-bounds. This happens sometimes but normally works fine. But it is not so rare that we can ignore it and we need to fix

Re: [sqlite] sqlite3_prepare_v2 and std::string using SQLite 3.7.5 - BUG or me?

2011-03-01 Thread Jay A. Kreibich
On Tue, Mar 01, 2011 at 05:13:00PM +0100, pcun...@fsmail.net scratched on the wall: > > Your examples suggest that actually sqlite3-bind_text "is not > > accepting std::string", not sqlite3_prepare_v2. But how exactly it > > "doesn't accept"? You pass SQLITE_STATIC as 5th parameter there; are you

Re: [sqlite] sqlite3_prepare_v2 and std::string using SQLite 3.7.5 - BUG or me?

2011-03-01 Thread pcunite
UPDATE - Problem solved ! I found the error. I am so sorry, I try to test and be a helpful member... :( I was calling sqlite3_prepare_v2() twice and it was canceling out everything apparently. I am building these queries on the fly so I just missed that. How this happend was because when building

Re: [sqlite] sqlite3_prepare_v2 and std::string using SQLite 3.7.5 - BUG or me?

2011-03-01 Thread pcunite
> Your examples suggest that actually sqlite3-bind_text "is not > accepting std::string", not sqlite3_prepare_v2. But how exactly it > "doesn't accept"? You pass SQLITE_STATIC as 5th parameter there; are you sure > you don't destroy or change your strings before statement is executed? Correct, it

Re: [sqlite] sqlite3_prepare_v2 and std::string using SQLite 3.7.5 - BUG or me?

2011-03-01 Thread Black, Michael (IS)
...@fsmail.net] Sent: Tuesday, March 01, 2011 9:43 AM To: sqlite-users@sqlite.org Subject: EXT :[sqlite] sqlite3_prepare_v2 and std::string using SQLite 3.7.5 - BUG or me? Maybe I am to sleepy, but sqlite3_prepare_v2 is not accepting a std::string as a parameter in the following example: // Setup

Re: [sqlite] sqlite3_prepare_v2 and std::string using SQLite 3.7.5 - BUG or me?

2011-03-01 Thread Pavel Ivanov
Your examples suggest that actually sqlite3-bind_text "is not accepting std::string", not sqlite3_prepare_v2. But how exactly it "doesn't accept"? You pass SQLITE_STATIC as 5th parameter there; are you sure you don't destroy or change your strings before statement is executed? Pavel On Tue, Mar

[sqlite] sqlite3_prepare_v2 and std::string using SQLite 3.7.5 - BUG or me?

2011-03-01 Thread pcunite
Maybe I am to sleepy, but sqlite3_prepare_v2 is not accepting a std::string as a parameter in the following example: // Setup table structure SQLiteCommand("CREATE TABLE IF NOT EXISTS USR_EVENTS(AID INTEGER PRIMARY KEY AUTOINCREMENT,USER_ID BIGINT,GROUP_ID BIGINT,SIS_EVENTS_PTR BIGINT"); SQLit

Re: [sqlite] sqlite3_prepare_v2 && SQLITE_BUSY

2010-05-17 Thread Dan Kennedy
On May 18, 2010, at 10:18 AM, Sam Carleton wrote: > For those of you following along my life (which I hope none of you > are), I > am working on cleaning up my code to handle SQLITE_BUSY correctly. > The > first issue I think I just successfully overcame was how to lock the > DB to > get m

[sqlite] sqlite3_prepare_v2 && SQLITE_BUSY

2010-05-17 Thread Sam Carleton
For those of you following along my life (which I hope none of you are), I am working on cleaning up my code to handle SQLITE_BUSY correctly. The first issue I think I just successfully overcame was how to lock the DB to get my code to return a SQLITE_BUSY. What I did was use the Firebird plugin

Re: [sqlite] sqlite3_prepare_v2

2009-12-25 Thread Max Vlasov
It's an interesting topic. Tried to search the web, and at least two well-known programs, Picasa and iTunes probably expects sqlite3.dll to be located somewhere in a shared place (probably system32 folder) and some other software silently replaced this dll with its own copy having this entry (sqlit

Re: [sqlite] sqlite3_prepare_v2

2009-12-25 Thread Dr. Robert N. Cleaves
PM To: Dr. Robert N. Cleaves Cc: sqlite-users@sqlite.org Subject: Re: [sqlite] sqlite3_prepare_v2 On Wed, 23 Dec 2009 16:50:08 -0500, "D. Richard Hipp" wrote: > >On Dec 23, 2009, at 4:12 PM, Dr. Robert N. Cleaves wrote: > >> Dear Sir: >> >> On startup, I g

Re: [sqlite] sqlite3_prepare_v2

2009-12-24 Thread Dan Kennedy
On Dec 24, 2009, at 5:46 PM, Nick Shaw wrote: > I'd suggest having your own sqlite3.dll in your own application's > working folder, rather than relying on an existing version somewhere > on the PC already which could be any version! > > If you created your own DLL, why would you then want to

Re: [sqlite] sqlite3_prepare_v2

2009-12-24 Thread Nick Shaw
turn (Ret); } //... // As long as LoadSqliteLibrary() returns TRUE, you can now use MySqlite3LibVersion() to return the library version number. //... Thanks, Nick. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Teg Sent: 2

Re: [sqlite] sqlite3_prepare_v2

2009-12-23 Thread Teg
I statically link for exactly this reason. If I WAS going to dynamic link though, I'd make my own DLL from the sources, give it a unique name, link against it's import lib and keep it in the same folder as my EXE. C Wednesday, December 23, 2009, 4:50:08 PM, you wrote: DRH> On Dec 23, 2009, at

Re: [sqlite] sqlite3_prepare_v2

2009-12-23 Thread Kees Nuyt
On Wed, 23 Dec 2009 16:50:08 -0500, "D. Richard Hipp" wrote: > >On Dec 23, 2009, at 4:12 PM, Dr. Robert N. Cleaves wrote: > >> Dear Sir: >> >> On startup, I get a message that the procedure entry point >> sqlite3_prepare_v2 is missing from the dynamic link library >> SQLite3.dll. How can I do

Re: [sqlite] sqlite3_prepare_v2

2009-12-23 Thread D. Richard Hipp
On Dec 23, 2009, at 4:12 PM, Dr. Robert N. Cleaves wrote: > Dear Sir: > > On startup, I get a message that the procedure entry point > sqlite3_prepare_v2 is missing from the dynamic link library > SQLite3.dll. How can I download the missing item? > > Thank you… I'm guessing you are running w

Re: [sqlite] sqlite3_prepare_v2 and error reporting

2008-07-27 Thread Glenn Maynard
On Sun, Jul 20, 2008 at 11:50:20PM -0400, Glenn Maynard wrote: > Why does the attached test case show the expected "cannot rollback - > no transaction is active" error with the v1 interface, but the > generic "SQL logic error or missing database" error when using the v2 > interface? > > If I add a

Re: [sqlite] sqlite3_prepare_v2 and error reporting

2008-07-20 Thread Glenn Maynard
The list seems to have mysteriously eaten my attachment (perhaps a bad configuration setting): #include #include #include int main() { { sqlite3 *pDatabase; int iRet = sqlite3_open("foo", &pDatabase); assert(iRet == SQLITE_OK);

[sqlite] sqlite3_prepare_v2 and error reporting

2008-07-20 Thread Glenn Maynard
Why does the attached test case show the expected "cannot rollback - no transaction is active" error with the v1 interface, but the generic "SQL logic error or missing database" error when using the v2 interface? If I add a sqlite3_reset to the v2 interface case (treating it like v1), I get the ex

Re: [sqlite] sqlite3_prepare_v2(pDb, stmt, -1, &pReadStmt, 0) for read the table

2008-04-10 Thread Joanne Pham
- Original Message From: Joanne Pham <[EMAIL PROTECTED]> To: General Discussion of SQLite Database Sent: Thursday, April 10, 2008 9:33:28 AM Subject: Re: [sqlite] sqlite3_prepare_v2(pDb, stmt, -1, &pReadStmt, 0) for read the table Here is what I had: pDb is the sqlite3 *pDb whi

Re: [sqlite] sqlite3_prepare_v2(pDb, stmt, -1, &pReadStmt, 0) for read the table

2008-04-10 Thread Joanne Pham
Tandetnik <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Thursday, April 10, 2008 9:13:38 AM Subject: Re: [sqlite] sqlite3_prepare_v2(pDb, stmt, -1, &pReadStmt, 0) for read the table Joanne Pham <[EMAIL PROTECTED]> wrote: > Thanks Igor for the info. > I have tried to

Re: [sqlite] sqlite3_prepare_v2(pDb, stmt, -1, &pReadStmt, 0) for read the table

2008-04-10 Thread Igor Tandetnik
Joanne Pham <[EMAIL PROTECTED]> wrote: > Thanks Igor for the info. > I have tried to prepare and execute each one seperately but it didn't > work. Define "didn't work". What exactly did you do, how did it behave, and how did the result differ from your expectations? -- With best wishes, Igor

Re: [sqlite] sqlite3_prepare_v2(pDb, stmt, -1, &pReadStmt, 0) for read the table

2008-04-10 Thread Joanne Pham
Thanks Igor for the info. I have tried to prepare and execute each one seperately but it didn't work. Thanks, JP - Original Message From: Igor Tandetnik <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Wednesday, April 9, 2008 8:25:05 PM Subject: Re: [sqlite] sqlite3

Re: [sqlite] sqlite3_prepare_v2(pDb, stmt, -1, &pReadStmt, 0) for read the table

2008-04-10 Thread Dennis Cote
Igor Tandetnik wrote: > "Joanne Pham" <[EMAIL PROTECTED]> >> attach database >> 'CommonDB' as CDB; select remoteId, bytesIn from compressTable where >> remoteId in (select remoteId from CDB.remoteWXTable where >> remoteType=1); detach database CDB; > > That's three statements, not one. You need t

Re: [sqlite] sqlite3_prepare_v2(pDb, stmt, -1, &pReadStmt, 0) for read the table

2008-04-09 Thread Igor Tandetnik
"Joanne Pham" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I used sqlite3_prepare_v2(pDb,stmt,-1,&pReadStmt,0) > for preparing the statement and used sqlite3_step(pReadStmt); to get > each row. > my stmt is : >select remoteId, bytesIn from compressTable > then it worked ok > >

[sqlite] sqlite3_prepare_v2(pDb, stmt, -1, &pReadStmt, 0) for read the table

2008-04-09 Thread Joanne Pham
Hi All, I used sqlite3_prepare_v2(pDb,stmt,-1,&pReadStmt,0) for preparing the statement and used sqlite3_step(pReadStmt); to get each row. my stmt is : select remoteId, bytesIn from compressTable then it worked ok but if my statement has the attach database then it didn't work because the sql

Re: [sqlite] sqlite3_prepare_v2 schema error Fatal, need help please.

2007-04-05 Thread pompomJuice
The query that is failing is fairly simple: sprintf( strStmt, "select count(*) from sqlite_master where type = 'table' and tbl_name = '%s'", tableName); I have checked and there are no "loose" queries hanging around and furthermore this is the first query that is executed by the program; To ex

Re: [sqlite] sqlite3_prepare_v2 schema error Fatal, need help please.

2007-04-05 Thread Dan Kennedy
On Thu, 2007-04-05 at 05:37 -0700, pompomJuice wrote: > Yes this is with the 3.3.14 code. I initially got the problem with the 3.3.12 > code so I just upgraded to the 3.3.14 code but it behaves exactly the same. > > Just to recap, my proposed fix was > //--- > while( rc == SQLITE_SCHEMA ) > rc =

Re: [sqlite] sqlite3_prepare_v2 schema error Fatal, need help please.

2007-04-05 Thread pompomJuice
Yes this is with the 3.3.14 code. I initially got the problem with the 3.3.12 code so I just upgraded to the 3.3.14 code but it behaves exactly the same. Just to recap, my proposed fix was //--- while( rc == SQLITE_SCHEMA ) rc = prepare_v2; // Some generic rc error checking here for prepare_v

Re: [sqlite] sqlite3_prepare_v2 schema error Fatal, need help please.

2007-04-05 Thread Dan Kennedy
On Thu, 2007-04-05 at 04:04 -0700, pompomJuice wrote: > Ok. > > I went and re-prepared the statement anyway even though the documentation > says it won't work. This trick only works if you finalize the failed > statement after the step command. Otherwhise you keep on getting > SQLITE_SCHEMA errors

Re: [sqlite] sqlite3_prepare_v2 schema error Fatal, need help please.

2007-04-05 Thread pompomJuice
Ok. I went and re-prepared the statement anyway even though the documentation says it won't work. This trick only works if you finalize the failed statement after the step command. Otherwhise you keep on getting SQLITE_SCHEMA errors which might cause and endless loop if so implemented. Interesti

[sqlite] sqlite3_prepare_v2 schema error Fatal, need help please.

2007-04-05 Thread pompomJuice
Hello. I recently rewrote most of my SQLite wrappers to now ignore SCHEMA errors, as these are now automagically handled by the new sqlite3_prepare_v2 API. The logic changes were simple so I did not bother to test it and continued with development. Now that development is complete and testing sta

Re: [sqlite] sqlite3_prepare_v2 and multi-connection schema changes

2007-01-12 Thread Ron Stevens
This should be fixed by checkin [3592]. Thanks for the quick fix! - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] sqlite3_prepare_v2 and multi-connection schema changes

2007-01-12 Thread drh
"Ron Stevens" <[EMAIL PROTECTED]> wrote: > I just switched to 3.3.10 and I'm playing around with sqlite3_prepare_v2. I > have a database with two open connections, and each connection creates its > own table. After the second connection creates its table all statements > created with sqlite3_prepar

Re: [sqlite] sqlite3_prepare_v2 and multi-connection schema changes

2007-01-12 Thread drh
"Ron Stevens" <[EMAIL PROTECTED]> wrote: > I'm wondering if sqlite3_prepare_v2 should try to reload the schema before > returning the SQLITE_SCHEMA error. Yes, it should. But I seem to have omitted this simple case from the test suite and I had a regression on the previous release. I suppose the

[sqlite] sqlite3_prepare_v2 and multi-connection schema changes

2007-01-12 Thread Ron Stevens
I just switched to 3.3.10 and I'm playing around with sqlite3_prepare_v2. I have a database with two open connections, and each connection creates its own table. After the second connection creates its table all statements created with sqlite3_prepare_v2 on the first connection fail with SQLITE_SC