qlite3 source.
Thanks,
Bella
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Marian Cascaval
Sent: Wednesday, January 26, 2011 7:26 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] how to create sqlite3_value str
FYI, I finally figured out why it is slow with C because I need to turn off
autocommit, it is now lightning speed :)
Thanks,
Bella
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> Parameters are numbered from 1, not from 0. Your first sqlite3_bind_int
> call fails; the second binds a value for function_id column; the
> parameter for function_name retains its initial value of NULL. The
> insert then runs afoul of NOT NULL constraint.
Ah, that fixed it. Thanks much.
Bel
On 1/26/2011 7:48 PM, Bella Chan wrote:
> I got "19 constraint failed" error from this code:
>
> "CREATE TABLE functions ("
> "function_id integer PRIMARY KEY,"
> "function_name integer not null"
> ");\n"
>
>
> sqlite3_bind_int(statement,0,i);
> sqlite3_bind_int(statement,
> Incorrect. You can bind_int or bind_int64 on an integer primary key column
> just like any other column.
> What does sqlite3_errcode(db) and sqlite3_errmsg(db) say after you run
> sqlite3_step(pStmt) on the above?
I got "19 constraint failed" error from this code:
"CREATE TABLE functions ("
"
On Wed, Jan 26, 2011 at 6:53 PM, Bella Chan wrote:
> I want to confirm that it is true that I can't do bind_int on integer
> primary key.
>
Incorrect. You can bind_int or bind_int64 on an integer primary key column
just like any other column.
>
> If I do "insert into functions values(?,?)" an
qlite3 source.
Thanks,
Bella
-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org]
On Behalf Of Marian Cascaval
Sent: Wednesday, January 26, 2011 7:26 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] how to create sqlite3_value str
Sent: Wed, January 26, 2011 2:51:38 PM
Subject: Re: [sqlite] how to create sqlite3_value structure to be used with
sqlite3_bind_value()?
Bella Chan wrote:
> I am surprised to see that C is slower than Perl when inserting lots of data
>into DB sequentially as I have 100 columns in a row
>
Bella Chan wrote:
> I am surprised to see that C is slower than Perl when inserting lots of data
> into DB sequentially as I have 100 columns in a row
> so I have been making 100 bind_int calls while Perl I only need to do execute
> once.
You are doing something wrong. Are you re-preparing the
I am surprised to see that C is slower than Perl when inserting lots of data
into DB sequentially as I have 100 columns in a row so I have been making 100
bind_int calls while Perl I only need to do execute once. Trying to see if I
can use bind_value() instead but no clue ho to create the sqlit
10 matches
Mail list logo