[sqlite] Problems with character '

2006-02-28 Thread Niels Boldt
Hi Guys I'm having some problems dealing with the character '. Sqlite thinks fair enough that it should terminate the string, which I would like it to avoid. Are there any solutions to my problems. Thanks, Niels

Re: [sqlite] Problems with character '

2006-02-28 Thread Philipp Knüsel
> Hi Guys > > I'm having some problems dealing with the character '. Sqlite thinks > fair enough that it should terminate the string, which I would like it > to avoid. Are there any solutions to my problems. > > Thanks, Niels Hello Niels try: sqlite> CREATE TABLE t (id INTEGER, bez TEXT);

RE: [sqlite] Problems with character '

2006-02-28 Thread Brandon, Nicholas (UK)
Hi Niels, You've just found the first problem with using TEXT columns. What you need to do is put another ' in front of it i.e. ''. Depending on the language you are using, you may find it includes a function that "escapes" special characters like '. For example, PHP supply

[sqlite] Fields update notification

2006-02-28 Thread Eugen Stoianovici
Is there a way to track changes performed on a table? What i need is a way of knowing when an insert/update has been issued on a table so that i can read the new values.

[sqlite] [kde-announce] Kexi 1.0 beta 1 released

2006-02-28 Thread Jarosław Staniek
For original announcement with links see http://kexi-project.org/wiki/wikiview/index.php?1.0Beta1Announcement --- Kexi Team Ships Beta Version of the First Major 1.0 Release to Free Integrated Database Environment

[sqlite] How to differentiate between Zero and NULL in an integer field

2006-02-28 Thread Luiz Americo Pereira Camara
The sqlite documentation states that when the stored value of an Integer field is NULL and is used sqlite3_column_int to retrieve the data, the returned value is 0. Currently to know if the value is zero or NULL i check the value of sqlite3_column_text (that returns NULL in that case). The

[sqlite] Re: Fields update notification

2006-02-28 Thread Igor Tandetnik
Eugen Stoianovici <[EMAIL PROTECTED]> wrote: Is there a way to track changes performed on a table? What i need is a way of knowing when an insert/update has been issued on a table so that i can read the new values. CREATE TRIGGER http://sqlite.org/lang_createtrigger.html Igor Tandetnik

Re: [sqlite] Re: Fields update notification

2006-02-28 Thread Eugen Stoianovici
On 2/28/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > > > CREATE TRIGGER > http://sqlite.org/lang_createtrigger.html > > Igor Tandetnik > Great! Thanks. (I should have mentionded that this was a beginners question)

Re: [sqlite] How to differentiate between Zero and NULL in an integer field

2006-02-28 Thread Ran
I think that sqlite3_column_type suppose to tell you if it is NULL. http://www.sqlite.org/capi3ref.html#sqlite3_column_type It returns SQLITE_NULL in that case. However I don't see how you can avoid calling two functions in a scenario you suspect a NULL (so if sqlite3_column_int returns a zero,

Re: [sqlite] Triggers and TEMP tables: ticket #1689

2006-02-28 Thread Brad
Should I remove the tests from SQLite that prevent triggers in one database from referring to tables in a different database? Well, I have a couple of triggers in my SQL Server database that refer to tables in another database, though they are on the same server. Obviously, I can see some

Re: [sqlite] Problems with character '

2006-02-28 Thread Thierry Nauze
Le 28 févr. 06 à 14:25, Niels Boldt a écrit : Hi Guys I'm having some problems dealing with the character '. Sqlite thinks fair enough that it should terminate the string, which I would like it to avoid. Are there any solutions to my problems. Thanks, Niels Replace the ' (one ' ) with

Re: [sqlite] Problems with character '

2006-02-28 Thread Teg
Hello Niels, That problem goes away if you switch to using the sqlite3_prepare sqlite3_bind_...() Syntax for insertions. Then all escaping becomes unnecessary. Using this syntax has removed an entire escaping layer I'd implemented. C Tuesday, February 28, 2006, 5:25:48 AM, you wrote: NB>

Re: [sqlite] How to differentiate between Zero and NULL in an integer field

2006-02-28 Thread Jay Sprenkle
On 2/28/06, Luiz Americo Pereira Camara <[EMAIL PROTECTED]> wrote: > The sqlite documentation states that when the stored value of an Integer > field is NULL and is used sqlite3_column_int to retrieve the data, the > returned value is 0. > Currently to know if the value is zero or NULL i check the

Re: [sqlite] Problems with character '

2006-02-28 Thread Jay Sprenkle
On 2/28/06, Teg <[EMAIL PROTECTED]> wrote: > Hello Niels, > > That problem goes away if you switch to using the > > sqlite3_prepare > > sqlite3_bind_...() > > Syntax for insertions. Then all escaping becomes unnecessary. Using > this syntax has removed an entire escaping layer I'd implemented. It

RE: [sqlite] Triggers and TEMP tables: ticket #1689

2006-02-28 Thread Cariotoglou Mike
I am not sure how this would work. in order for a trigger to "See" another database, somebody (obviously not the trigger) must ATTACH the database first. is there an automatic ATTACH capability that I am not aware of ? if not, specifying triggers than span databases is looking for trouble IMHO. as

[sqlite] sqlite3_last_insert_rowid in transactions

2006-02-28 Thread Clay Dowling
I'm using SQLite in a performance-intensive data conversion process and it's come about that it would be very useful to get the insert_rowid of the last record inserted while I'm still in the middle of a transaction of servert hundred inserts(the primary key will become a foreign key to a child

Re: [sqlite] sqlite3_last_insert_rowid in transactions

2006-02-28 Thread drh
"Clay Dowling" <[EMAIL PROTECTED]> wrote: > > Can I get a reliable rowid from [sqlite3_last_insert_rowid()] > while I'm in the middle of a transaction > Yes. Why would you think otherwise? -- D. Richard Hipp <[EMAIL PROTECTED]>

[sqlite] sqlite3_step() never returns an error code

2006-02-28 Thread Ryan M. Lederman
I'm using SQLite under Windows CE, and I cannot for the life of me get an error code from sqlite3_step(), even when the SQL statement I compiled with sqlite3_prepare() is clearly not valid (wrong # of columns, column type mismatch, etc.) It *never* returns anything other than SQLITE_DONE or

Re: [sqlite] [kde-announce] Kexi 1.0 beta 1 released

2006-02-28 Thread Vishal Kashyap
Why is this mail here. Does this software support SQlite as backend ??? On 2/28/06, Jarosław Staniek <[EMAIL PROTECTED]> wrote: > > For original announcement with links see > http://kexi-project.org/wiki/wikiview/index.php?1.0Beta1Announcement > >

[sqlite] memory database, ATTACH, and threads

2006-02-28 Thread Kervin L. Pierre
Hello, I am not sure if that is exactly the problem, but it seems that sqlite3_prepare() deadlocks when called to attach a in-memory database that is already attached. The second ATTACH occurs on a separate thread with a separate handle to a database that is already opened in the process. Is

[sqlite] Oracle's SQLite???

2006-02-28 Thread drh
As ssen at http://www.linuxdevices.com/news/NS3880195342.html The Acme Fox also supports PHP development, optionally with Oracle's open source SQLite database. Amusing, but not true. -- D. Richard Hipp <[EMAIL PROTECTED]>

Re: [sqlite] OT: Donations?

2006-02-28 Thread drh
"Denis Sbragion" <[EMAIL PROTECTED]> wrote: > Hello, > > might be a bit off topic, but, is there any way to make donations to SQLite? I > haven't been able to find informations on the SQLite web site. > There is no mechanism set up to "donate" to SQLite as there is with other open-source

Re: [sqlite] Oracle's SQLite???

2006-02-28 Thread Firman Wandayandi
On 3/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > As ssen at http://www.linuxdevices.com/news/NS3880195342.html > > The Acme Fox also supports PHP development, optionally > with Oracle's open source SQLite database. > > > Amusing, but not true. Heh, Oracle's SQLite?

Re: [sqlite] [kde-announce] Kexi 1.0 beta 1 released

2006-02-28 Thread Luiz Americo Pereira Camara
Vishal Kashyap escreveu: Why is this mail here. Does this software support SQlite as backend ??? Yes. In fact is the default file format. See http://kexi-project.org/wiki/wikiview/index.php?KexiFAQ#3._File_Formats Luiz

Re: [sqlite] Triggers and TEMP tables: ticket #1689

2006-02-28 Thread K. Haley
[EMAIL PROTECTED] wrote: > A user complains in ticket #1689 that SQLite does not > allow triggers in one database to refer to tables in > a different database or to TEMP tables. ... > Should I remove the tests from SQLite that prevent > triggers in one database from referring to tables in > a