Re: [sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Scott Hess
On Tue, Apr 7, 2009 at 7:04 PM, Vinnie wrote: > On the other hand there is some legacy data that I want to store > using UTF-8. For these fields I will use sqlite3_bind_text(). It is > possible that in a single INSERT statement there are both UTF-16 > and UTF-8 (wchar_t and

Re: [sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Nicolas Williams
On Tue, Apr 07, 2009 at 08:28:24PM -0700, Vinnie wrote: > > > Note that both UTF-8 and UTF-16 are capable of representing > > the full range of Unicode characters. Conversion between the two is > > lossless. You seem to be under impression that UTF-8 is somehow > > deficient, only suitable for

Re: [sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Vinnie
> Note that both UTF-8 and UTF-16 are capable of representing > the full range of Unicode characters. Conversion between the two is > lossless. You seem to be under impression that UTF-8 is somehow > deficient, only suitable for "legacy" encoding. This is not the > case. Yeah thats what they

Re: [sqlite] Select statements in the context of transactions.

2009-04-07 Thread Rosemary Alles
Thanks Puneet. Those suggestions really help. -rosemary. On Apr 7, 2009, at 5:52 PM, P Kishor wrote: > On Tue, Apr 7, 2009 at 5:18 PM, Rosemary Alles > wrote: >> Puneet, >> >> As you suggested I have supplied a brief background re: the problem: >> >> Background: >>

Re: [sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Igor Tandetnik
"Vinnie" wrote in message news:320060.55321...@web58204.mail.re3.yahoo.com > However, I have table fields which will be UTF-16. For example, > filenames that have to support international character sets. Or > metadata fields that use different character sets (UNICODE). For >

Re: [sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Bill KING
Vinnie wrote: > PRAGMA statements, I see what you mean now. This is exactly what I needed, > thanks a lot. > > To clarify what I am doing, my SQL statements are in UTF-8 and they are all > prepared, with parameter bindings. So table names, column names, etc.. are > all UTF-8. > > However, I

Re: [sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Vinnie
PRAGMA statements, I see what you mean now. This is exactly what I needed, thanks a lot. To clarify what I am doing, my SQL statements are in UTF-8 and they are all prepared, with parameter bindings. So table names, column names, etc.. are all UTF-8. However, I have table fields which will

Re: [sqlite] Select statements in the context of transactions.

2009-04-07 Thread P Kishor
On Tue, Apr 7, 2009 at 5:18 PM, Rosemary Alles wrote: > Puneet, > > As you suggested I have supplied a brief background re: the problem: > > Background: > I'm very new to sql (x2 weeks). I have a database with two tables one > with -say (max)- 12k rows of data, and the

Re: [sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Bill KING
Igor Tandetnik wrote: > You can mix and match encodings in your application. The database > encoding determines how strings are actually stored in the file (and > it's database-wide, not per table). SQLite API converts back and forth > as necessary. > Very inneficiently, but yes, it does. I

[sqlite] On-line documentation license

2009-04-07 Thread Krzysztof 'ChanibaL' Bociurko
Hello, I'm in the process of writing my bachelors and I'd like to use the awesome SQL syntax diagrams for DML and perhaps DDL statements from SQLites on-line documentation. I can't find anything on the license of the documentation (apart from "The details here are unclear."), so I thought it'd

Re: [sqlite] Select statements in the context of transactions.

2009-04-07 Thread John Stanton
A TRANSACTION only has a meaning when the database is being altered. There are no journalling and commits on a read. You get the results of the SELECT as soon as the database read occurs. You cannot be faster than that. Where you can get improved SELECT performance is by using caching.

Re: [sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Igor Tandetnik
Vinnie wrote: >> From: "Igor Tandetnik" >> You could convert your file name from UTF-16 to UTF-8, then >> call sqlite3_open_v2. > > Converting the file name is no problem. But I thought that depending > on how you opened the database (open16 versus

Re: [sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Vinnie
> From: "Igor Tandetnik" > You could convert your file name from UTF-16 to UTF-8, then > call sqlite3_open_v2. Converting the file name is no problem. But I thought that depending on how you opened the database (open16 versus open_v2), SQL treats your strings

Re: [sqlite] Strange sqlite_busy deadlock behavior

2009-04-07 Thread D. Richard Hipp
On Apr 7, 2009, at 6:11 PM, Dave Brown wrote: > I am seeing the equivalent of a deadlock, with SQLITE_BUSY being > returned > forever from my code which has 2 threads using SQLite. I can repro > this at > will. Each thread is using it's own connection to the sqlite > database, so > they

Re: [sqlite] Select statements in the context of transactions.

2009-04-07 Thread Rosemary Alles
Puneet, As you suggested I have supplied a brief background re: the problem: Background: I'm very new to sql (x2 weeks). I have a database with two tables one with -say (max)- 12k rows of data, and the other with more. The first table (lets calls it A) has the following columns: source_id,

[sqlite] Strange sqlite_busy deadlock behavior

2009-04-07 Thread Dave Brown
I am seeing the equivalent of a deadlock, with SQLITE_BUSY being returned forever from my code which has 2 threads using SQLite. I can repro this at will. Each thread is using it's own connection to the sqlite database, so they are not sharing the same connection. Here is what is happening in

Re: [sqlite] Select statements in the context of transactions.

2009-04-07 Thread P Kishor
On Tue, Apr 7, 2009 at 3:45 PM, Rosemary Alles wrote: > Hullo Puneet, > > Many thanks for your response. > > My understanding of a sqlite3 "transaction" is probably poor. From your > response > (if you are correct) I see that only UPDATES and INSERTS can be speeded up >

Re: [sqlite] Select statements in the context of transactions.

2009-04-07 Thread Igor Tandetnik
Rosemary Alles wrote: > Is there no difference in behavior between a SINGLE select and several > of them within the context of transaction? There is, of course, a difference between running one SELECT statement and running more than one, regardless of transactions. I

Re: [sqlite] Select statements in the context of transactions.

2009-04-07 Thread Rosemary Alles
Hullo Puneet, Many thanks for your response. My understanding of a sqlite3 "transaction" is probably poor. From your response (if you are correct) I see that only UPDATES and INSERTS can be speeded up via bundling many numbers of them in a Being/Commit block? Leading me to ask: Is there no

[sqlite] [Fwd: [SpatiaLite-Users] spatialite-2.3.0 has been released]

2009-04-07 Thread Alex Mandel
Original Message Subject: [SpatiaLite-Users] spatialite-2.3.0 has been released Date: Tue, 07 Apr 2009 20:27:51 +0200 From: Alessandro Furieri Reply-To: spatialite-us...@googlegroups.com To: spatialite-us...@googlegroups.com Hi list, I've just released

[sqlite] ANN - DBD::SQLite version 1.20

2009-04-07 Thread Darren Duncan
All, I am pleased to announce that DBD::SQLite (Self Contained RDBMS in a DBI Driver) version 1.20 has been released on CPAN. http://search.cpan.org/dist/DBD-SQLite/ This follows on the heels of 10 developer releases released starting 2009 March 27th (Adam "Alias" Kennedy has been doing

Re: [sqlite] SQLite + CrystalReport + Visual Basic . NET

2009-04-07 Thread Steven . Farmer
Yes there is an ODBC driver to use with SQLite.dll Check out this web page. http://www.ch-werner.de/sqliteodbc sqlite-users-boun...@sqlite.org wrote on 04/07/2009 02:13:28 AM: > Hello, > > Is it possible to use CystalReport + SQLite with Visual Basic 2005. NET?? > > Thanks, > > Ernany >

Re: [sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Eric Minbiole
> Dear Group: > > When my application launches I want to open the associated database, and if > that fails because the file does not exist then I would create a new > database. > > sqlite3_open_v2() is ideal for this purpose because you can leave out > SQLITE_OPEN_CREATE flag, and specify

Re: [sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Igor Tandetnik
Vinnie wrote: > Unfortunately, this is all academic because I am using > sqlite3_open16()! Where is the UTF-16 version that accepts the flags > as a parameter? How can I achieve the same functionality? You could convert your file name from UTF-16 to UTF-8, then call

Re: [sqlite] Select statements in the context of transactions.

2009-04-07 Thread Igor Tandetnik
Rosemary Alles wrote: > 1) If I were to bundle several thousand SELECT statements in a single > transaction - why would it not run faster? Why do you believe it should? > 2) This is precisely the problem though - each of those statements > will yield rows of results to

Re: [sqlite] Select statements in the context of transactions.

2009-04-07 Thread P Kishor
On Tue, Apr 7, 2009 at 2:36 PM, Rosemary Alles wrote: > Hullo Igor, > > Many thanks for your response: I believe I didn't phrase my question > correctly: > > 1) If I were to bundle several thousand SELECT statements in a single > transaction - why would it not run faster?

[sqlite] UTF-16 API a second class citizen?

2009-04-07 Thread Vinnie
Dear Group: When my application launches I want to open the associated database, and if that fails because the file does not exist then I would create a new database. sqlite3_open_v2() is ideal for this purpose because you can leave out SQLITE_OPEN_CREATE flag, and specify

Re: [sqlite] Select statements in the context of transactions.

2009-04-07 Thread Rosemary Alles
Hullo Igor, Many thanks for your response: I believe I didn't phrase my question correctly: 1) If I were to bundle several thousand SELECT statements in a single transaction - why would it not run faster? 2) This is precisely the problem though - each of those statements will yield rows of

Re: [sqlite] Vacuum syntax

2009-04-07 Thread Gerry Snyder
Richard Dauben wrote: > Hopefully a quick Vacuum question I want to vacuum my sqlite3 database > from an Objective C program but have not been able to find the necessary > routine or statement. What is the proper syntax? > Gimme a V Gimme an A Gimme a C Gimme a U Gimme a U Gimme an M

[sqlite] Vacuum syntax

2009-04-07 Thread Richard Dauben
Hopefully a quick Vacuum question  I want to vacuum my sqlite3 database from an Objective C program but have not been able to find the necessary routine or statement.  What is the proper syntax? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] On-line documentation license

2009-04-07 Thread D. Richard Hipp
On Apr 5, 2009, at 9:52 PM, Krzysztof 'ChanibaL' Bociurko wrote: > I'd like to use the great SQL syntax diagrams for DML and perhaps > DDL statements from > SQLites on-line documentation. Can I do that? Yes > > PS. What was used to produce the diagrams, http://wiki.tcl.tk/21708 D. Richard

[sqlite] On-line documentation license

2009-04-07 Thread Krzysztof 'ChanibaL' Bociurko
Hello, I'm in the process of writing my bachelors and I'd like to use the great SQL syntax diagrams for DML and perhaps DDL statements from SQLites on-line documentation. I can't find anything on the license of the documentation (apart from "The details here are unclear."), so I thought it'd be

Re: [sqlite] Simple Tokenizer in FTS3

2009-04-07 Thread Andy Roberts
I shall follow-up myself as I've made some progress. I noticed that if I let the default loop run with !isalnum() and then overrode specific ascii values like the apostrophe, then I started seeing results which I expected. I then realised that perhaps the fact that the MATCH query is "string*"

Re: [sqlite] Simple Tokenizer in FTS3

2009-04-07 Thread Andy Roberts
Thanks for at least confirming that I was on the right track. I was doing some basic inspection of the delim array before and after I changed it and that seemed to be doing what I wanted to do. I didn't look any closer at the simpleNext function which is clearly my next port of call. It does

Re: [sqlite] Is it using an index?

2009-04-07 Thread John Machin
On 7/04/2009 6:43 AM, Scott Baker wrote: [snip] > I must have typod and not noticed. Your hypothesis carries within itself the seed of its own plausibility :-) ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Database handle(sqlite3_stmt)

2009-04-07 Thread Joanne Pham
Thanks Igor! Just a question. I always used two different statements handle: one for insert and one for select for Sqlserver as well as Sqlite. Thanks again for responding my email. JP From: Igor Tandetnik To: sqlite-users@sqlite.org

[sqlite] SQLite + CrystalReport + Visual Basic . NET

2009-04-07 Thread Ernany
Hello, Is it possible to use CystalReport + SQLite with Visual Basic 2005. NET?? Thanks, Ernany ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users