Re: [sqlite] Unicode Confusion and Database Size

2011-09-01 Thread Mohit Sindhwani
Hi Igor, On 1/9/2011 11:57 PM, Igor Tandetnik wrote: On 9/1/2011 10:24 AM, Mohit Sindhwani wrote: I understand that the database could be either UTF-8 or UTF-16 - but that would apply to the full DB not to a single column, right? Right. *many useful answers snipped* Thank you very much!!

Re: [sqlite] Unicode Confusion and Database Size

2011-09-01 Thread Igor Tandetnik
On 9/1/2011 10:24 AM, Mohit Sindhwani wrote: I understand that the database could be either UTF-8 or UTF-16 - but that would apply to the full DB not to a single column, right? Right. If that is the case, would it not make the database larger if we had a lot of content that was originally

[sqlite] Unicode Confusion and Database Size

2011-09-01 Thread Mohit Sindhwani
Hi All, I apologize first if this question has its roots in my partial understanding of unicode and the various UTF-encodings. We're using Windows CE and SQLite3 - so far, we have only used ASCII data. Now, we're going to store data in other languages and feel the need to go towards

Re: [sqlite] SQLite discovery otD -- ASCII newlines

2011-09-01 Thread Jay A. Kreibich
On Thu, Sep 01, 2011 at 02:52:06PM +0100, Simon Slavin scratched on the wall: > Putting this here in the hope it comes in useful for someone sometime. > > Have a table which has some text fields in it. For use with an old > system the text fields had newlines in which were expressed with C >

[sqlite] SQLite discovery otD -- ASCII newlines

2011-09-01 Thread Simon Slavin
Putting this here in the hope it comes in useful for someone sometime. Have a table which has some text fields in it. For use with an old system the text fields had newlines in which were expressed with C escapes: 'firstline\nsecondline'. Here's how I fixed it: UPDATE myTable SET

Re: [sqlite] (no subject)

2011-09-01 Thread Tim Streater
On 31 Aug 2011 at 23:24, Igor Tandetnik wrote: > On 8/31/2011 5:56 PM, Tim Streater wrote: >> In the above, each database is newly created as shown. What I had >> forgotten to do was to create the "test" table in the second database >> before copying the data. What seems to

Re: [sqlite] sqlite3_step causing Segmentation Fault

2011-09-01 Thread Black, Michael (IS)
I'm guessing you want "&(user.getPhoto()[0])" or just "user.getPhoto()" A pointer...not the first value of your photo. Michael D. Black Senior Scientist NG Information Systems Advanced Analytics Directorate From: sqlite-users-boun...@sqlite.org

Re: [sqlite] sqlite3_step causing Segmentation Fault

2011-09-01 Thread Igor Tandetnik
Rafael Toledo wrote: > rc = sqlite3_prepare_v2(mydb, "INSERT INTO users (name, isadmin, > photo) VALUES (?, 1, ?)", -1, , NULL); > if (rc != SQLITE_OK) { > sqlite3_finalize(statement); If prepare fails, statement is never updated. So you are passing garbage to

[sqlite] sqlite3_step causing Segmentation Fault

2011-09-01 Thread Rafael Toledo
Hello! I'm coding a simple method in C++ to insert a tuple in a small database. The database has a table called 'user', with 3 fields (id - the primary key, name, and a image). I mapped these fields in a class - id is an int, name is a std::string and image is a std::vector of unsigned char. In

Re: [sqlite] sql function to change multiple links within a DB

2011-09-01 Thread Black, Michael (IS)
sqlite> create table questions (answer text); sqlite> insert into questions values('/FAQ/Doctors'); sqlite> select * from questions; /FAQ/Doctors sqlite> select ltrim(ltrim(ltrim(answer,'/'),'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'),'/') from questions; Doctors You need to add

Re: [sqlite] out of sequence error 2

2011-09-01 Thread NOCaut
i think. problemm from parallel access not i try create mutex in main project, than sent mutexHandle to my dll and dw = WaitForSingleObject(hMutex, 5000L) ; Messagebox(0,L"message",L"box",0); // this messaege(0,L"",L"",0); if (dw == WAIT_OBJECT_0) { CppSQLite3Query q =

Re: [sqlite] out of sequence error 2

2011-09-01 Thread Stephan Beal
On Thu, Sep 1, 2011 at 9:10 AM, NOCaut wrote: > > How wait for finish query? > while(q1.step()); // or q1.fetch() <<< this function i not find > try q1.finalize(), as someone suggested for your previous post. -- - stephan beal http://wanderinghorse.net/home/stephan/

[sqlite] out of sequence error 2

2011-09-01 Thread NOCaut
How wait for finish query? while(q1.step()); // or q1.fetch() <<< this function i not find CppSQLite3Query q2= db.execQuery("..."); otherstring = db.execQuery("two"); // out of sequence error q2.finalize(); -- View this message in context: