RE: [sqlite] Re: Insert chinese characters in SQLite database

2007-12-13 Thread Kalyani Phadke
] Re: Insert chinese characters in SQLite database Kalyani Phadke wrote: > The following query inserts into the database > > Cmd1 .Parameters.Append(Cmd1 .CreateParameter("ipaddress", > adLongVarChar, adParamInput, 50, ipaddress)) Try adLongVarWChar for parameter

[sqlite] Re: Insert chinese characters in SQLite database

2007-12-13 Thread Igor Tandetnik
Kalyani Phadke wrote: The following query inserts into the database Cmd1 .Parameters.Append(Cmd1 .CreateParameter("ipaddress", adLongVarChar, adParamInput, 50, ipaddress)) Try adLongVarWChar for parameter type. Igor Tandetnik --

Re: [sqlite] Re: INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Jevgenijs Rogovs
It runs fine as long as it is small... If the text in the field is longer, it seems to crash. Any idea how to drop that stupid depth limit? Where do I specify that option? The official site (http://www.sqlite.org/limits.html) does not explain this... On Nov 14, 2007 3:53 PM, Dan Kennedy <[EMAIL PR

Re: [sqlite] Re: INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Dan Kennedy
On Wed, 2007-11-14 at 15:38 +0200, Jevgenijs Rogovs wrote: > Thanks, but how do I use those? > See, I have a huge file of INSERT statements, which look like this: > > INSERT INTO sometable VALUES ('blablabla\r\nyadayadayada'); > > What I need is to import this data into SQLite database. If I chan

Re: [sqlite] Re: INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Jevgenijs Rogovs
I suppose I could try raising the limit of tree depth, or removing it whatsoever, but how do I do that, provided that I'm doing my import like this: sqlite3 mydatabase.db < myhugescript.sql Tried the -DSQLITE_MAX_EXPR_DEPTH=0 option on sqlite3 command line, but it doesn't recognize it! What am I

Re: [sqlite] Re: INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Jevgenijs Rogovs
Thanks, but how do I use those? See, I have a huge file of INSERT statements, which look like this: INSERT INTO sometable VALUES ('blablabla\r\nyadayadayada'); What I need is to import this data into SQLite database. If I change all \r\n occurances into the following: INSERT INTO sometable VALUE

[sqlite] Re: INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Igor Tandetnik
Jevgenijs Rogovs <[EMAIL PROTECTED]> wrote: Could someone please assist me with the following: how do I insert a string into an SQLite database that contains a CR or LF character? C-style escapes (like \r and \n) are not working with SQLite, so how can I do this? Use parameterized statements -

RE: [sqlite] Re: INSERT OR IGNORE and sqlite3_last_insert_rowid()

2007-10-29 Thread Michael Ruck
Ok, thanks I haven't seen this function. I'll try it. Mike -Ursprüngliche Nachricht- Von: Igor Tandetnik [mailto:[EMAIL PROTECTED] Gesendet: Montag, 29. Oktober 2007 17:01 An: SQLite Betreff: [sqlite] Re: INSERT OR IGNORE and sqlite3_last_insert_rowid() Michael Ruck wrote:

[sqlite] Re: INSERT OR IGNORE and sqlite3_last_insert_rowid()

2007-10-29 Thread Igor Tandetnik
Michael Ruck wrote: I don't get an error code. So how should I decide if I should call sqlite3_last_insert_rowid() or not? :) That's the problem - I don't have any indication if an insert was actually performed or if it was simply ignored sqlite3_changes Igor Tandetnik ---

Re: [sqlite] Re: INSERT after creating an INDEX

2007-09-13 Thread Frank Fiedler
Hi Igor, All prepared statements become invalid when the database schema changes. You need to finalize your statement and prepare it again. Alternatively, if you are using new enough version of SQLite, use sqlite3_prepare_v2 to prepare your statements: it stores the original query string and

[sqlite] Re: INSERT after creating an INDEX

2007-09-13 Thread Igor Tandetnik
Frank Fiedler <[EMAIL PROTECTED]> wrote: I have a problem inserting elements into a data base (from process1 accessing the data base) after creating an INDEX on a table (from another process accessing the data base). The error I get is the following: "SQLITE_ERROR : SQL logic error or missing da

Re: [sqlite] Re: INSERT OR REPLACE without new rowid

2007-05-08 Thread Cesar Rodas
On 24/04/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: Trey Mack <[EMAIL PROTECTED]> wrote: > I'd like to perform an update to a row if it exists (uniquely > identified by 3 text columns), otherwise insert a new row with the > right data. INSERT OR REPLACE looks good, but it generates a new > pr

[sqlite] Re: INSERT OR REPLACE without new rowid

2007-04-24 Thread Igor Tandetnik
Trey Mack <[EMAIL PROTECTED]> wrote: I'd like to perform an update to a row if it exists (uniquely identified by 3 text columns), otherwise insert a new row with the right data. INSERT OR REPLACE looks good, but it generates a new primary key each time there is a conflict. If the row exists, I n

RE: [sqlite] Re: Insert

2007-02-28 Thread Christian POMPIER
But what is the good syntax ? -Message d'origine- De : Igor Tandetnik [mailto:[EMAIL PROTECTED] Envoyé : mercredi 28 février 2007 13:37 À : SQLite Objet : [sqlite] Re: Insert Christian POMPIER <[EMAIL PROTECTED]> wrote: > Could i make to insert 10 000 row in my table with

[sqlite] Re: Insert

2007-02-28 Thread Igor Tandetnik
Christian POMPIER <[EMAIL PROTECTED]> wrote: Could i make to insert 10 000 row in my table with a loop ? Yes. Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] --

Re: [sqlite] Re: insert default values - supporting it?

2006-08-01 Thread Mario Frasca
just to show that it does not crash: sqlite> create table test2 (k integer primary key autoincrement); sqlite> insert into test2 default values; sqlite> insert into test2 () values (); sqlite> select * from test2; 1 2 sqlite>

Re: [sqlite] Re: insert default values - supporting it?

2006-08-01 Thread Mario Frasca
I refined the patch. it constructs a list of values with one NULL, but I don't see how to construct an idList with just the primary key. also added the grammar rule to recognize both: insert into default values; insert into () values (); anybody completing/correcting the work? sqlite> ins

[sqlite] Re: insert default values - supporting it?

2006-07-31 Thread Mario Frasca
I'm throwing this here, I assume that it would not be too much work to complete this patch. the aim is to support the sql92 syntax insert into default values; any comments? hints? thanks in advance, Mario Frasca. cvs diff: Diffing src Index: src/insert.c =

Re: [sqlite] Re: Insert triggers

2006-01-24 Thread Dennis Cote
Igor Tandetnik wrote: nbiggs wrote: Can an insert trigger cause an update trigger to be fired also? My triggers are listed below. I want tgr_on_insert to fire tgr_on_update. SQLite does not support cascading triggers. Operations performed by a trigger never cause other triggers to run.

[sqlite] Re: Insert triggers

2006-01-24 Thread Igor Tandetnik
nbiggs wrote: Can an insert trigger cause an update trigger to be fired also? My triggers are listed below. I want tgr_on_insert to fire tgr_on_update. SQLite does not support cascading triggers. Operations performed by a trigger never cause other triggers to run. Igor Tandetnik

[sqlite] Re: Insert performance metrics

2005-12-12 Thread Aaron Burghardt
Hi, OK, I am impressed that you can insert 2000 records/second on indexed columns. I have an application that inserts CSV data into an SQLite database, and inserting 15 million records is taking about 2 hours with no indices (this is on a PowerMac Dual G5 2.0 GHz, 1.5 GB RAM), though two