[sqlite] Table Info Pragmas as Virtual Table?

2007-02-27 Thread Michael Schlenker
Hi all, for some uses its nice to query the PRAGMA and the sqlite_master table with a single query instead of multiple PRAGMA statements. Could the Pragmas to query the database schema be converted to virtual tables? (that would enable joins with sqlite_master and other nice uses to get all

Re: [sqlite] Table Info Pragmas as Virtual Table?

2007-02-27 Thread Dan Kennedy
On Tue, 2007-02-27 at 10:48 +0100, Michael Schlenker wrote: > Hi all, > > for some uses its nice to query the PRAGMA and the sqlite_master table > with a single query instead of multiple PRAGMA statements. > > Could the Pragmas to query the database schema be converted to virtual > tables?

Re: [sqlite] Table Info Pragmas as Virtual Table?

2007-02-27 Thread Joe Wilson
--- Dan Kennedy <[EMAIL PROTECTED]> wrote: > On Tue, 2007-02-27 at 10:48 +0100, Michael Schlenker wrote: > > Hi all, > > > > for some uses its nice to query the PRAGMA and the sqlite_master table > > with a single query instead of multiple PRAGMA statements. > > > > Could the Pragmas to query

[sqlite] Quotes in SQLite ?

2007-02-27 Thread Stef Mientki
This might be a stupid question, but how do you store quotes in textstrings ? Is it really so that you have to replace, both single and double quotes, each time you read or write something ? Are there other such kind of special characters ? thanks, Stef Mientki

[sqlite] Re: Quotes in SQLite ?

2007-02-27 Thread Igor Tandetnik
Stef Mientki <[EMAIL PROTECTED]> wrote: This might be a stupid question, but how do you store quotes in textstrings ? Is it really so that you have to replace, both single and double quotes, each time you read or write something ? You need to escape single quotes if you insist on putting

Re: [sqlite] Re: Quotes in SQLite ?

2007-02-27 Thread Stef Mientki
Igor Tandetnik wrote: Stef Mientki <[EMAIL PROTECTED]> wrote: This might be a stupid question, but how do you store quotes in textstrings ? Is it really so that you have to replace, both single and double quotes, each time you read or write something ? You need to escape single quotes if

[sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Jakub Ladman
Hi everybody Which files do i need at target (small embedded linux system)? after make i have these files alter.ohash.o opcodes.o pragma.o utf.o analyze.o insert.o os.o prepare.o util.o attach.o keywordhash.h os_os2.o printf.o

[sqlite] Re: Re: Quotes in SQLite ?

2007-02-27 Thread Igor Tandetnik
Stef Mientki <[EMAIL PROTECTED]> wrote: Igor Tandetnik wrote: You need to escape single quotes if you insist on putting string literals directly into queries. No other characters need to be escaped. I've to translate doublequotes too, possibly because I'm using double quotes around textfields

Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread anis chaaba
you need the libsqlite.so.0... or the libsqlite3.so crosscompiled if you need the commande line copy sqlite3 or sqlite to your target 2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>: Hi everybody Which files do i need at target (small embedded linux system)? after make i have these files alter.o

[sqlite] SQL error: database is locked

2007-02-27 Thread Jakub Ladman
Dear Friends Please let me know what should i do with this? SQLite version 3.3.13 Enter ".help" for instructions sqlite> create table tbl1(one varchar(10), two smallint); SQL error: database is locked sqlite> (sqlite is launched by root) Jakub Ladman

Re: [sqlite] Re: Quotes in SQLite ?

2007-02-27 Thread Dennis Cote
Stef Mientki wrote: I've to translate doublequotes too, possibly because I'm using double quotes around textfields ??, Is that wrong ? Not wrong,but not standard either. The SQL standard uses single quotes for string literals and double quotes for quoted identifiers (names that contain

Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Jakub Ladman
Dne úterý 27 únor 2007 16:31 anis chaaba napsal(a): > you need the libsqlite.so.0... or the libsqlite3.so crosscompiled :-( there is no .so file :-( Jakub > if you need the commande line copy sqlite3 or sqlite to your target > > 2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>: > > Hi everybody > >

Re: [sqlite] SQL error: database is locked

2007-02-27 Thread anis chaaba
there's another process using the data base or executing a transaction 2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>: Dear Friends Please let me know what should i do with this? SQLite version 3.3.13 Enter ".help" for instructions sqlite> create table tbl1(one varchar(10), two smallint); SQL

Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Martin Jenkins
Jakub Ladman wrote: And what should i do with this? SQLite version 3.3.13 Enter ".help" for instructions sqlite> create table tbl1(one varchar(10), two smallint); SQL error: database is locked sqlite> What was the command line? Can you get Tcl running on your machine? As you've

Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread anis chaaba
you must change the configure file to use the tool chain to cross compile your lib. you must do modifications like gcc becomes gcc-arm-linux for example. but what kind of target do you have? do you have a tool chain 2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>: Dne úterý 27 únor 2007 16:31 anis

Re: [sqlite] Re: Quotes in SQLite ?

2007-02-27 Thread Stef Mientki
Dennis, Igor thanks very much, I think I'm getting the picture. cheers, Stef - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] SQL error: database is locked

2007-02-27 Thread Jakub Ladman
Dne úterý 27 únor 2007 16:44 anis chaaba napsal(a): > there's another process using the data base or executing a transaction No there's not. :-( I have fear, that is some bug in croscompilation. Jakub Ladman > > 2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>: > > Dear Friends > > Please let me

Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Jakub Ladman
Dne úterý 27 únor 2007 16:46 Martin Jenkins napsal(a): > Jakub Ladman wrote: > > And what should i do with this? > > > > SQLite version 3.3.13 > > Enter ".help" for instructions > > sqlite> create table tbl1(one varchar(10), two smallint); > > SQL error: database is locked > > sqlite> > > What was

Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Jakub Ladman
My target is sh4-pc-linux-uclibc And now i have .so too. sh4-pc-linux-uclibc-gcc -shared *.o -o sqlite3.so Dne úterý 27 únor 2007 16:39 Jakub Ladman napsal(a): > Dne úterý 27 únor 2007 16:31 anis chaaba napsal(a): > > you need the libsqlite.so.0... or the libsqlite3.so crosscompiled > > > :-(

Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread drh
Jakub Ladman <[EMAIL PROTECTED]> wrote: > Hi everybody > Which files do i need at target (small embedded linux system)? > I think the easiest way to build on a (possibly strange) target embedded system is to do this on your development platform: make target_source That make target creates a

[sqlite] Singular Sqlite3Explorer 2.0 question

2007-02-27 Thread Noah Hart
Has anyone used this program? I am trying to use the "Import using Regular Expression" option. Itis looking for some type of regular expression to parse the columns. Any suggestions or sample expressions you can offer? Regards, Noah Hart CONFIDENTIALITY NOTICE: This message may contain

Re: [sqlite] SQL error: database is locked

2007-02-27 Thread Joe Wilson
> > 2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>: > > > Dear Friends > > > Please let me know what should i do with this? > > > > > > SQLite version 3.3.13 > > > Enter ".help" for instructions > > > sqlite> create table tbl1(one varchar(10), two smallint); > > > SQL error: database is locked > > >

Re: [sqlite] SQL error: database is locked

2007-02-27 Thread Joe Wilson
On second thought, instead of -D__DJGPP__, comment out the following lines in src/os_unix.c instead: /* #ifdef __DJGPP__ */ # define fcntl(A,B,C) 0 /* #endif */ --- Joe Wilson <[EMAIL PROTECTED]> wrote: > I suspect file locking via fcntl() is not working in your embedded libc. > > Try

RE: [sqlite] ANN: SQLite ODBC Driver 0.73

2007-02-27 Thread Noah Hart
Hello Christian, I tried your odbc driver, and it works pretty well, but does not handle Unicode at all. I have a "dictionary" application with two columns, first being English, second being Punjab (stored in Unicode) For example, simple table with EN_WORD PJ_WORD === === Punjabi

Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Martin Jenkins
Jakub Ladman wrote: Problem is, that i do not know tcl. I know only that it exist. Jakub That's OK, it's just another target (make test) in the Makefile. You don't need to know any Tcl, you just have to install the source code and know where you've installed it. make test builds a program

Re: [sqlite] ANN: SQLite ODBC Driver 0.73

2007-02-27 Thread Christian Werner
Noah Hart wrote: > > Hello Christian, > > I tried your odbc driver, and it works pretty well, but does not handle > Unicode at all. > > I have a "dictionary" application with two columns, first being English, > second being Punjab (stored in Unicode) > For example, simple table with > EN_WORD

[sqlite] How to change or add fields to a table ?

2007-02-27 Thread Stef Mientki
With the pragma table_info I can get the complete table structure Pragma table_info(Patient) Are there SQL commands to add or change the fields of an existing table, or should the table completely be rebuild ? -- thanks, Stef Mientki http://pic.flappie.nl

[sqlite] Re: How to change or add fields to a table ?

2007-02-27 Thread Igor Tandetnik
Stef Mientki <[EMAIL PROTECTED]> wrote: Are there SQL commands to add or change the fields of an existing table, or should the table completely be rebuild ? Some limited changes may be done with ALTER TABLE statement: http://www.sqlite.org/lang_altertable.html For anything else, you would

Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Jakub Ladman
Dne úterý 27 únor 2007 20:47 Martin Jenkins napsal(a): > Jakub Ladman wrote: > > Problem is, that i do not know tcl. I know only that it exist. > > Jakub > > That's OK, it's just another target (make test) in the Makefile. You > don't need to know any Tcl, you just have to install the source code

Re: [sqlite] Re: How to change or add fields to a table ?

2007-02-27 Thread Stef Mientki
thanks Igor, for the fast answer. (should have found that myself ;-) But there's a strange thing here I don't understand: somewhere on the ALTER TABLE documentation it says: "to rename or add a new column ..." My English isn't too well, but from the rest of the text I don't understand how I

[sqlite] Re: Re: How to change or add fields to a table ?

2007-02-27 Thread Igor Tandetnik
Stef Mientki <[EMAIL PROTECTED]> wrote: thanks Igor, for the fast answer. (should have found that myself ;-) But there's a strange thing here I don't understand: somewhere on the ALTER TABLE documentation it says: "to rename or add a new column ..." It should be parsed this way: ... allows

Re: [sqlite] Re: Re: How to change or add fields to a table ?

2007-02-27 Thread Stef Mientki
On the other hand I fear that I can only change the name of the Table. If the later is true, why isn't possible to change the name of a column (shouldn't be difficult to implement) ? Please feel free to submit a patch. Thank you, but I'm just a Newbie ;-) It was certainly not to criticize

Re: [sqlite] Re: Re: How to change or add fields to a table ?

2007-02-27 Thread P Kishor
On 2/27/07, Stef Mientki <[EMAIL PROTECTED]> wrote: > >> On the other hand I fear that I can only change the name of the Table. >> If the later is true, why isn't possible to change the name of a >> column (shouldn't be difficult to implement) ? > > Please feel free to submit a patch. Thank

[sqlite] how to insert and select a date column

2007-02-27 Thread Rafi Cohen
Hi, I apologize in advance for the probably very basic question as I'm a newbie to sqlite and integrating sql in C applications. One of my tables in my database requires a date column. I understand from a tutorial not related to C/C++ api that insering date columns is not trivial and triggers