Re: [sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

2011-02-01 Thread Tito Ciuro
Hello Marian, On Feb 1, 2011, at 1:28 PM, Marian Cascaval wrote: > Since this topic has lead to different sub-topic I dare ask a question (I'm a > beginner both in C++ and, Oh boy, in SQLite too). > > Tito, do you really need the 5th argument in sqlite3_prepare_v2() i.e. > ""? > From what I

Re: [sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

2011-02-01 Thread Marian Cascaval
ing .. or all. Marian Cascaval From: Tito Ciuro <tci...@mac.com> To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Sent: Mon, January 31, 2011 9:38:57 PM Subject: [sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

Re: [sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

2011-02-01 Thread Tito Ciuro
Hi Drake, On Feb 1, 2011, at 9:33 AM, Drake Wilson wrote: > Quoth Tito Ciuro , on 2011-02-01 09:01:09 -0200: >> I don't think so. The fileSystemRepresentation method should we used >> when dealing with file-based paths. > > But not when dealing with SQLite paths, unless I'm

Re: [sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

2011-02-01 Thread Drake Wilson
Quoth Tito Ciuro , on 2011-02-01 09:01:09 -0200: > I don't think so. The fileSystemRepresentation method should we used > when dealing with file-based paths. But not when dealing with SQLite paths, unless I'm mistaken about what fileSystemRepresentation does. sqlite3_open_v2

Re: [sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

2011-02-01 Thread Tito Ciuro
Hi Afriza, On Feb 1, 2011, at 4:16 AM, Afriza N. Arief wrote: > On Tue, Feb 1, 2011 at 3:38 AM, Tito Ciuro wrote: > >> Hello, >> >> The following code snippet runs fine on Mac OS X, but fails on the iOS >> simulator: >> >> // Obtain a path for the database >> NSString

Re: [sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

2011-01-31 Thread Afriza N. Arief
On Tue, Feb 1, 2011 at 3:38 AM, Tito Ciuro wrote: > Hello, > > The following code snippet runs fine on Mac OS X, but fails on the iOS > simulator: > >// Obtain a path for the database >NSString *docs = > [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,

Re: [sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

2011-01-31 Thread Tito Ciuro
Hello Simon, On Jan 31, 2011, at 8:29 PM, Simon Slavin wrote: > > On 31 Jan 2011, at 7:55pm, Tito Ciuro wrote: > >> What do you mean by "no further"? In my app, I use both statements. I have >> trimmed down the code in this email thread to show the error. Be sure I use >> these two

Re: [sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

2011-01-31 Thread Simon Slavin
On 31 Jan 2011, at 7:55pm, Tito Ciuro wrote: > What do you mean by "no further"? In my app, I use both statements. I have > trimmed down the code in this email thread to show the error. Be sure I use > these two statements later on. The reason I cache the statements is to save > time during

Re: [sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

2011-01-31 Thread Tito Ciuro
Hi Simon, On Jan 31, 2011, at 5:49 PM, Simon Slavin wrote: > > On 31 Jan 2011, at 7:38pm, Tito Ciuro wrote: > >> So my question I have is, why would the second sqlite3_prepare_v2 statement >> fail only on path-based iOS apps? :-/ > > The other question is: Is it permissable to have two

Re: [sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

2011-01-31 Thread Simon Slavin
On 31 Jan 2011, at 7:38pm, Tito Ciuro wrote: > So my question I have is, why would the second sqlite3_prepare_v2 statement > fail only on path-based iOS apps? :-/ The other question is: Is it permissable to have two statements prepared but no further, for the same database connection. Simon.

[sqlite] Second sqlite3_prepare_v2() call fails on iOS path-based databases

2011-01-31 Thread Tito Ciuro
Hello, The following code snippet runs fine on Mac OS X, but fails on the iOS simulator: // Obtain a path for the database NSString *docs = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; NSString *path = [[docs