Hi,
Very simple, What will be the output of printf("i"); it won't be 0 right?
use snprintf or sprintf and formulate the string then execute the query.
int i=0;
char * a[100];
snprintf(a,100,"insert into emp values(%d);",i); /or
/*sprintf(a,"insert into emp values(%d);",i);*/
rc =
hi,
need help with very basic question.. More of C than SQLite.
have a very simple C program using sqlite DB.
..
int i=0;
rc = sqlite3_exec(db, "create table emp (empid num);", callback, 0, );
rc = sqlite3_exec(db, "insert into emp values(i);", 0, 0, );
---
> Can someone be so kind as to provide a short example of initializing
> asynchronous module, opening DB for read/write, create a table, and write
> some data to it?
There's nothing special in opening db, creating table or writing data
into it while using async module. You should use the same
Hi,
I am planning on incorporating the sqlite3async module into my project to
improve code responsiveness during disk writes. I've Googled all over for
example code on using the module but can't find any.
Can someone be so kind as to provide a short example of initializing
asynchronous
On 4 Apr 2011, at 9:04pm, Gert Van Assche wrote:
> We need to import thousands of documents in an SQLite db for use with FTS.
> The FTS part I understand (more or less) but I don't know how to import so
> many docs in the DB.
> Does anyone know a tool to do this?
> I won't be the one doing the
All,
We need to import thousands of documents in an SQLite db for use with FTS.
The FTS part I understand (more or less) but I don't know how to import so
many docs in the DB.
Does anyone know a tool to do this?
I won't be the one doing the import, but users that can't work on command
line (or we
> Basically, the column with name "model" has data type BLOB, and null is
> being written to that column.
I think your problem is with jdbc driver (I guess its setBytes
implemented via the text data type, not blob) and with the fact that
writeBuffer[0] is equal to 0. Changing writeBuffer[0] to
Hello,
I created the following sample code to test the BLOB data type.
I am using sqlite-jdbc driver provided at
(http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC).
The following is the source code (SSCE).
package org.sqlite;
import java.sql.Connection;
import java.sql.DriverManager;
import
On Mon, Apr 4, 2011 at 12:26 PM, Simon Slavin wrote:
> But he's combining two INSERTs into one. What I think he needs is first an
> INSERT OR FAIL to possibly add a new person, and then an INSERT ... SELECT
> which looks up that person's ID.
I didn't see that in the
On 4 Apr 2011, at 6:01pm, Nico Williams wrote:
> On Mon, Apr 4, 2011 at 11:25 AM, Simon Slavin wrote:
>> Probably not. Don't try to turn SQL into a procedural language. Do the
>> SELECT that tells you whether the record exists and gives you the
>> information you need
On Mon, Apr 4, 2011 at 11:25 AM, Simon Slavin wrote:
> Probably not. Don't try to turn SQL into a procedural language. Do the
> SELECT that tells you whether the record exists and gives you the information
> you need if it does, then do whatever INSERTs you need to do.
> I can create the dll, but it does not work with BLOB data type. It works
> with other data types. The dll that I downloaded from the sqlite.org website
> works with BLOB data type.
>
> Any help would be appreciated.
Any pointers on what doesn't work for you and how it works instead of
intended
On 4 Apr 2011, at 4:26pm, Marcelo Serrano Zanetti wrote:
> About the "new" item, yes I do compare some specific fields and not the
> primary key. For example name and surname of a person ... I look in the
> database for such a person ... if yes I return her id ... if not I
> include her and
Hello,
I need build instructions for Windows with unicode support.
I am using sqlite3.h and sqlite3.c from the amalgamation source downloaded
from http://sqlite.org/sqlite-amalgamation-3070500.zip.
I am using the following CFLAGS when compiling sqlite
SQLITE_ENABLE_COLUMN_METADATA
On 04/04/2011 05:16 PM, Robert Poor wrote:
> @Marcelo:
>
> Going back to your original question: do you really only want to
> insert one item at a time? If so, I think your question has been
> answered reasonably well.
>
> BUT: if you have a large number of items, and you want to insert items
>
@Marcelo:
Going back to your original question: do you really only want to
insert one item at a time? If so, I think your question has been
answered reasonably well.
BUT: if you have a large number of items, and you want to insert items
that aren't yet in the table, then you can do it
2011/4/4 Nico Williams :
> You're missing something: FTS4 is a virtual table
In triggers code we can't know about virtual tables! So in triggers we
may get wrong results?..
As example (this _does not_ work now):
CREATE TRIGGER view_job_update instead of update on view_job
On Mon, Apr 4, 2011 at 9:10 AM, Enrico Thierbach wrote:
> I might have an exceptionally dumb day, but this sequence (from this post
> http://www.mail-archive.com/sqlite-users@sqlite.org/msg34082.html ) looks
> totally fine:
You're missing something: FTS4 is a virtual table
On 04.04.2011, at 15:59, Simon Slavin wrote:
>
> On 4 Apr 2011, at 2:48pm, Enrico Thierbach wrote:
>
>> isn't last_insert_rowid defined as the ID of the last row inserted
>
> Yes it is. But the FTS system does what it does by maintaining extra tables,
> and doing extra operations to them
On 04.04.2011, at 15:59, Simon Slavin wrote:
>
> On 4 Apr 2011, at 2:48pm, Enrico Thierbach wrote:
>
>> isn't last_insert_rowid defined as the ID of the last row inserted
>
> Yes it is. But the FTS system does what it does by maintaining extra tables,
> and doing extra operations to them
On 4 Apr 2011, at 2:48pm, Enrico Thierbach wrote:
> isn't last_insert_rowid defined as the ID of the last row inserted
Yes it is. But the FTS system does what it does by maintaining extra tables,
and doing extra operations to them besides the ones that the programmer has
asked for.
> From: contactcolincuthb...@hotmail.com
> To: sqlite-users@sqlite.org
> Date: Mon, 4 Apr 2011 13:12:02 +
> Subject: Re: [sqlite] Question:how to insert row with multiple values from
> same field of different rows of another table?
>
>
>
>
> > From: punk.k...@gmail.com
> > Date: Mon, 4
Hi Nico,
this
>> Is this really a bug? I at least wouldn't expect last_insert_rowid to be
>> constant if the database gets modified.
>
was more a question for sake of my understanding. Both in the post Simon
referred to
> insert into one (value) values ("hello1");
> select
> From: punk.k...@gmail.com
> Date: Mon, 4 Apr 2011 08:06:31 -0500
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Question:how to insert row with multiple values from
> same field of different rows of another table?
>
>
> On Apr 4, 2011, at 7:59 AM, Colin Cuthbert wrote:
>
> >
>
On Mon, Apr 4, 2011 at 6:43 AM, Enrico Thierbach wrote:
> Is this really a bug? I at least wouldn't expect last_insert_rowid to be
> constant if the database gets modified.
If you read the post that Simon referenced you'll see that the caller
typically wants to know the row
On Apr 4, 2011, at 7:59 AM, Colin Cuthbert wrote:
>
>
>
>> From: punk.k...@gmail.com
>> Date: Sun, 3 Apr 2011 07:52:42 -0500
>> To: sqlite-users@sqlite.org
>> Subject: Re: [sqlite] Question:how to insert row with multiple values from
>> same field of different rows of another table?
>>
>>
> From: punk.k...@gmail.com
> Date: Sun, 3 Apr 2011 07:52:42 -0500
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Question:how to insert row with multiple values from
> same field of different rows of another table?
>
>
> On Apr 3, 2011, at 7:50 AM, Luuk wrote:
>
> > On 03-04-2011
Hi.
I want to use spatiaLite extension in a php-Project. But i am not able to
loaad it. I hope somebody could help me.
I am using SQLite in this project as database.
I have added:
sqlite3.extension_dir = "/usr/local/spatiaLite""
...to the php.ini and restarted apache. Now I can find exactly
> Date: Sun, 3 Apr 2011 14:50:30 +0200
> From: luu...@gmail.com
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Question:how to insert row with multiple values from
> same field of different rows of another table?
>
> On 03-04-2011 14:43, Colin Cuthbert wrote:
> > First time I've used
Is this really a bug? I at least wouldn't expect last_insert_rowid to be
constant if the database gets modified.
/eno
On 04.04.2011, at 13:28, Alexey Pechnikov wrote:
> $ sqlite3
> SQLite version 3.7.6
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite>
On 4 Apr 2011, at 12:28pm, Alexey Pechnikov wrote:
> sqlite> delete from fts where rowid=2;
> sqlite> select last_insert_rowid();
> 3
See
http://www.mail-archive.com/sqlite-users@sqlite.org/msg34082.html
Simon.
___
sqlite-users mailing list
On 4 Apr 2011, at 11:53am, thilo wrote:
> On 4/4/2011 2:05 AM, Guilherme Bamepe wrote:
>> Hi!
>>
>> I'm new in SQLite, and I'm studying it to do a work in my college,
>> and would be helpful if I get the SQLite to print, while executing
>> the sql, after each table scan or join, the name of the
$ sqlite3
SQLite version 3.7.6
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> CREATE VIRTUAL TABLE fts USING fts4(a,TOKENIZE icu russian);
sqlite> select last_insert_rowid();
0
sqlite> insert into fts(a) values ('test');
sqlite> insert into fts(a) values
On 4/4/2011 2:05 AM, Guilherme Bamepe wrote:
> Hi!
>
> I'm new in SQLite, and I'm studying it to do a work in my college,
> and would be helpful if I get the SQLite to print, while executing
> the sql, after each table scan or join, the name of the table and
> number of rows that are going to the
On 4 Apr 2011, at 7:12am, Deepti Marathe wrote:
> From what I see in the examples in libxml, I can read an excel file in my
> program, but I still cannot figure out how to upload that file(the data in
> that file) to a table in SQlite.
Use the data from that table to create the appropriate
On 04/03/2011 09:05 PM, Petite Abeille wrote:
> On Apr 3, 2011, at 3:18 PM, Marcelo Serrano Zanetti wrote:
>
>> It does not work in this way ... could somebody tell me please what is
>> the correct sintax or whether this is possible at all.
> As mentioned, SQL is not a procedural language, so, no.
>From what I see in the examples in libxml, I can read an excel file in my
program, but I still cannot figure out how to upload that file(the data in
that file) to a table in SQlite.
Mohd Radzi Ibrahim wrote:
>
> Hi,
> Try use www.libxl.com that has C/C++/C#/Delphi interface to read excel
>
37 matches
Mail list logo