Re: [sqlite] Re : Patch - Column names

2006-12-08 Thread Sandeep Suresh
Nikki Locke wrote: Joe Wilson wrote: Looks reasonable. Consider filing a ticket with your patch. A few "make test" tests that rely on the old short name behavior for SELECT * with joins will report failure. Whether the old way is necessarily correct in some tests is a matter of debate.

Re: [sqlite] Re: Unicode Help

2006-12-08 Thread Trevor Talbot
On 12/8/06, Kees Nuyt <[EMAIL PROTECTED]> wrote: On Fri, 8 Dec 2006 15:54:45 +, you wrote: > How do you set Notepad to Ecnoding = Unicode. > I cant see an option for that ? Perhaps it listens to a BOM? It does, and will also try heuristics to detect the encoding if no BOM is present. But

Re: [sqlite] sqlite3_column_double - problems when assigning values to variable

2006-12-08 Thread John Stanton
Maybe your statement does not reference a valid row. Marten Feldtmann wrote: I have written some interface code to the sqlite3 API using the OpenWatcom 1.5 compiler and I wrapped several functions like sqlite3_column_text, sqlite3_column_int and all went fine. Then I tried to wrap sqlite3_colum

Re: [sqlite] is blob compression worth it

2006-12-08 Thread Daniel Önnerby
Thanks for pointing out the obvious :) Seriously though, there are times when probably all of us has made "just a simple database" that was not normalized in the correct way that later turns out to be used a lot more than intended. Normalizing the database at a later state requires a lot of mo

[sqlite] sqlite3_column_double - problems when assigning values to variable

2006-12-08 Thread Marten Feldtmann
I have written some interface code to the sqlite3 API using the OpenWatcom 1.5 compiler and I wrapped several functions like sqlite3_column_text, sqlite3_column_int and all went fine. Then I tried to wrap sqlite3_column_double(..) and when I do something like ... sqlite3_column_double( stmt, 0)

Re: [sqlite] Re: Unicode Help

2006-12-08 Thread Kees Nuyt
On Fri, 8 Dec 2006 15:54:45 +, you wrote: > How do you set Notepad to Ecnoding = Unicode. > I cant see an option for that ? Perhaps it listens to a BOM? http://unicode.org/unicode/faq/utf_bom.html#22 It would mean you have to initialize your textfile before editing with some utility like awk

[sqlite] enabling loading of extensions?

2006-12-08 Thread Richard Harding
I'm new to sqlite and trying to see about using sqlite with the fulltext plugin to test against what I already do in mysql. I have the plugin .so and cannot load it since the default is to disable loading of extensions. What I can't figure out is how to flip that switch. There is reference to

Re: [sqlite] Determining Data Types

2006-12-08 Thread Will Leshner
On 12/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: This gets into my ignorance of how sqlite works internally, but if I quote an "integer" value, it will still be stored correctly? I have no problems doing that, I just wasn't sure if that was the case. Also, how do I need to send date f

Re: [sqlite] Determining Data Types

2006-12-08 Thread epankoke
This gets into my ignorance of how sqlite works internally, but if I quote an "integer" value, it will still be stored correctly? I have no problems doing that, I just wasn't sure if that was the case. Also, how do I need to send date fields to sqlite to have them stored properly? -- Eric Pan

Re: [sqlite] is blob compression worth it

2006-12-08 Thread John Stanton
Your solution here is to normalize your database. Third normal form will do it for you. Daniel Önnerby wrote: Just out of curiosity. If I for instants have 1000 rows in a table with a lot of blobs and a lot of them have the same data in them, is there any way to make a plugin to sqlite that

Re: [sqlite] Re: Unicode Help

2006-12-08 Thread Da Martian
EUREKA! Ok I got it working now. It turns out my source was UTF-8 Encoded, so even when i used the utf-16 functions it wasnt comming out right. I am now doing a converstion in delphi from UTF-8 to UTF16 and using all UTF-16 sqlite functions as recommended. Thanks a million for all your help, it

Re: [sqlite] Determining Data Types

2006-12-08 Thread Will Leshner
On 12/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I can construct the update statement without much issue, but I need to know whether or not I should put quotes around value, so I need to know whether or not field3 is a text type field. Why not just quote all the values?

RE: [sqlite] about call back of sqlite.

2006-12-08 Thread Pat Wibbeler
You might also be able to watch the database file itself for changes using a platform specific mechanism. On UNIX, you could use kqueue's and on Windows a combination of FindFirstChangeNotification, FindNextChangeNotification and WaitForMultipleObjects. This would allow you to watch for databa

[sqlite] doing everything sqlite warns against

2006-12-08 Thread Hickey, Larry
I have a system requirement that feeds thousands of keyed records, each of which contains a blob of around a meg or so into an sqlite database. Ok so far. But the records come from multiple processes, and I can't afford to do have commits after each insertion for obvious performance reasons (if you

Re: [sqlite] Determining Data Types

2006-12-08 Thread Scott Hess
On 12/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I appreciate the insight, but I'm not sure it helps with my situation. This is what I'm trying to accomplish: 1. User selects 1 or more fields from a table using basic "SELECT fields FROM table" syntax, and the result is retrieved using sq

Re: [sqlite] Determining Data Types

2006-12-08 Thread epankoke
I appreciate the insight, but I'm not sure it helps with my situation. This is what I'm trying to accomplish: 1. User selects 1 or more fields from a table using basic "SELECT fields FROM table" syntax, and the result is retrieved using sqlite_get_table (this is still in v2.8x) 2. User calls a

Re: [sqlite] Determining Data Types

2006-12-08 Thread Seth Falcon
[EMAIL PROTECTED] writes: > Please forgive me, because I know this has been covered before, but > at the moment I'm at a loss. I am writing an SQLite wrapper for a > relatively new language, and one of the requirements is that the > user be able to add and update date as if they were using an ADO

Re: [sqlite] Re: Unicode Help

2006-12-08 Thread Da Martian
It looks fine to me. To help check it, one thing you can try is writing the result of FieldAsString directly to a file as raw bytes, then in notepad open that with "encoding" set to "Unicode". E.g. something logically equivalent to: size := Length(field) * 2; SetLength(buffer, size ); S

Re: [sqlite] is blob compression worth it

2006-12-08 Thread Dennis Cote
Daniel Önnerby wrote: Just out of curiosity. If I for instants have 1000 rows in a table with a lot of blobs and a lot of them have the same data in them, is there any way to make a plugin to sqlite that in this case would just save a reference to another blob if it's identical. I guess this c

[sqlite] Determining Data Types

2006-12-08 Thread epankoke
Please forgive me, because I know this has been covered before, but at the moment I'm at a loss. I am writing an SQLite wrapper for a relatively new language, and one of the requirements is that the user be able to add and update date as if they were using an ADO recordset. As a result, I need

Re: [sqlite] about call back of sqlite.

2006-12-08 Thread Roberto
On 08/12/06, hongsion <[EMAIL PROTECTED]> wrote: Hi sqlite, I want to using sqlite this way. Application A register callback to sqlite db. And application B will modify sqlite db. I want each time sqlite was modified by B, A is notified by callback. Is this possible in sqlite? A and

Re: [sqlite] is blob compression worth it

2006-12-08 Thread Daniel Önnerby
Just out of curiosity. If I for instants have 1000 rows in a table with a lot of blobs and a lot of them have the same data in them, is there any way to make a plugin to sqlite that in this case would just save a reference to another blob if it's identical. I guess this could save a lot of spac

Re: [sqlite] ip2long

2006-12-08 Thread Daniel Önnerby
I havn't followed the whole thread, but from what I understand you store the data as numbers and not IP-strings. The most common way of checking a range is to use a IP-mask, and this should work fine in this case as well. Something like: SELECT * FROM myiptable WHERE (ip & "maskvalue") == ("subn

[sqlite] database locked

2006-12-08 Thread LEGRAND, Véronique
Hello, I encounter the following difficulties with sqlite3: I have 4 different processes working on an sqlite3 database. When the "sql timeout" (set by "sqlite3_busy_timeout") is set to 5 seconds and that all processes are running on a same windows machine, it seems OK (I am not 100% sure o