[sqlite] how to insert and select a date column
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 need to be used. As I am not knowledgeable about triggers, I would like to ask how can I insert a date column in a C application and later retrieve this column or compare it with current date in a select statement? I need to insert just any date in this column and not only the current date. If somebody can send me an example off list to implement this, I'll much appreciate it. Thanks, Rafi.
Re: [sqlite] Re: Re: How to change or add fields to a table ?
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 you, but I'm just a Newbie ;-) It was certainly not to criticize SQLite, (It's the first database I found without difficult couplings / logins, so I really love it), but I wondered if there was a special nifty reason to omit the renaming of columns. Stef, Adding columns is allowed. Dropping columns is not allowed. You can easily add a new column with the new name, and update it with the value of the old column. -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ Open Source Geospatial Foundation http://www.osgeo.org/education/ - collaborate, communicate, compete = - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Re: Re: How to change or add fields to a table ?
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 SQLite, (It's the first database I found without difficult couplings / logins, so I really love it), but I wondered if there was a special nifty reason to omit the renaming of columns. thanks again, Stef Mientki - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Re: Re: How to change or add fields to a table ?
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 the user to rename, or add a new column to, an existing table. That is, you can rename an existing table, or add a new column to an existing table. 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. Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Re: How to change or add fields to a table ?
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 can change a columns name. 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) ? cheers, Stef Igor Tandetnik wrote: 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 need to create a new table and migrate data. Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] - -- cheers, Stef Mientki http://pic.flappie.nl - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Crosscompiled sqlite was: developer mailing list
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 and > know where you've installed it. > > make test builds a program (called testfixture) which drives the sqlite > library you've just built from tiny Tcl programs. Dr Hipp has written > lots of these programs over the years. You might have to tweak the tool > chain but as you've already built the library you should be OK. The test > suite has over 20,000 tests in it, so it's well worth getting it going > on a port to a new platform. > > Martin But there is not tcl library at the time and when I tried to build sqlite without -DNO_TCL it failed. I can test it on the sh4 cpu for the community, of course, if you think it will be usefull. Jakub > > --- >-- To unsubscribe, send email to [EMAIL PROTECTED] > --- >-- - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Re: How to change or add fields to a table ?
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 need to create a new table and migrate data. Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] How to change or add fields to a table ?
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 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] ANN: SQLite ODBC Driver 0.73
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 PJ_WORD > === === > Punjabi ਪੰ�ਾਬ� > > If I link a sqlite3 table via access and run a query to insert into the > table, I get gibberish in the sqlite3 database. > > Did you support Unicode in your odbc driver? Noah, IMO the SQLite3 driver starting with version 0.71 (as well as the SQLite3 UTF-8 driver) does support UNICODE. There could be some olden Accesses which don't use the SQLWCHAR ODBC APIs. Did you try that simple table with OpenOffice 2.0.* Base with UTF-8 as Base's encoding ? Regards, Christian - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Crosscompiled sqlite was: developer mailing list
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 (called testfixture) which drives the sqlite library you've just built from tiny Tcl programs. Dr Hipp has written lots of these programs over the years. You might have to tweak the tool chain but as you've already built the library you should be OK. The test suite has over 20,000 tests in it, so it's well worth getting it going on a port to a new platform. Martin - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] ANN: SQLite ODBC Driver 0.73
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 ਪੰਜਾਬੀ If I link a sqlite3 table via access and run a query to insert into the table, I get gibberish in the sqlite3 database. Did you support Unicode in your odbc driver? Thanks, Noah Hart -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Werner Sent: Sunday, February 18, 2007 11:28 AM To: sqlite-users@sqlite.org Subject: [sqlite] ANN: SQLite ODBC Driver 0.73 Hi all, release 0.73 of the SQLite ODBC driver is available for download from http://www.ch-werner.de/sqliteodbc >From the change log: * update to SQLite 3.3.13 * SQLGetInfo(SQL_OWNER_TERM) now is empty string * fixed bug in Win32 version concerning SQLDriverConnect() * added -L/-l/-I/-i switches to sqlite+tcc.c Cheers, Christian - To unsubscribe, send email to [EMAIL PROTECTED] - CONFIDENTIALITY NOTICE: This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQL error: database is locked
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 compiling the source code with -D__DJGPP__ which will make fcntl() a no > op. > > - Or - if that fails try compiling with -DSQLITE_LOCK_TRACE -DSQLITE_DEBUG to > see what errors it generates. > > (Don't do both at the same time) No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQL error: database is locked
> > 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 > > > sqlite> > > > > > > (sqlite is launched by root) I suspect file locking via fcntl() is not working in your embedded libc. Try compiling the source code with -D__DJGPP__ which will make fcntl() a no op. - Or - if that fails try compiling with -DSQLITE_LOCK_TRACE -DSQLITE_DEBUG to see what errors it generates. (Don't do both at the same time) Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Singular Sqlite3Explorer 2.0 question
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 confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Crosscompiled sqlite was: developer mailing list
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 directory called "tsrc" and fills it will all the preprocessed source files and headers you will need to build the actual library. From these preprocessed files, you might want to remove tclsqlite.c (if you do not want the TCL interface) or fts* if you don't care about full-text search or shell.c if you don't want the shell command. Once you've removed these extra files, build the shared library for you target system like this: cross-cc -o libsqlite3-cross.so -shared *.c If you are really ambitious, you might want to add a few -DSQLITE_... argments to the command-line above to turn off unwanted features or turn on optional features or whatever. -- D. Richard Hipp <[EMAIL PROTECTED]> - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Crosscompiled sqlite was: developer mailing list
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 > > > :-( 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 > > > 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 vacuum.o > > > auth.o legacy.o os_unix.o random.o vdbe.o > > > btree.olemon os_win.o select.o vdbeapi.o > > > build.olempar.c pager.osqlite3vdbeaux.o > > > callback.o libsqlite3.a parse.csqlite3.h vdbefifo.o > > > complete.o loadext.o parse.htable.ovdbemem.o > > > date.o main.o parse.h.temp tclsqlite.ovtab.o > > > delete.o mkkeywordhash parse.otokenize.o where.o > > > expr.o opcodes.c parse.out trigger.o > > > func.o opcodes.h parse.yupdate.o > > > /mnt/nfs/home/jakub/shsqlite $ > > > > > > > > > Which files are necessary for running, and which for linking to my own > > > C programs? > > > > > > 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> > > > > > > > > > Thank you > > > Jakub Ladman > > > > > > > > > > > > > > > --- > > >-- To unsubscribe, send email to > > > [EMAIL PROTECTED] > > > > > > --- > > >-- > > --- >-- To unsubscribe, send email to [EMAIL PROTECTED] > --- >-- - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Crosscompiled sqlite was: developer mailing list
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 the command line? Can you get Tcl running on your machine? As > you've effectively made a effectively new port it would be a good idea > to try and get the tests working - they should pinpoint any areas which > aren't working. A list of failing tests should make it easier to track > the problem down than a "database locked" from the shell. Problem is, that i do not know tcl. I know only that it exist. Jakub > > Martin > > --- >-- To unsubscribe, send email to [EMAIL PROTECTED] > --- >-- - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQL error: database is locked
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 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 > > > > > > - > > To unsubscribe, send email to [EMAIL PROTECTED] > > > > - > > - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Re: Quotes in SQLite ?
Dennis, Igor thanks very much, I think I'm getting the picture. cheers, Stef - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Crosscompiled sqlite was: developer mailing list
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 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 > > 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 vacuum.o > > auth.o legacy.o os_unix.o random.o vdbe.o > > btree.olemon os_win.o select.o vdbeapi.o > > build.olempar.c pager.osqlite3vdbeaux.o > > callback.o libsqlite3.a parse.csqlite3.h vdbefifo.o > > complete.o loadext.o parse.htable.ovdbemem.o > > date.o main.o parse.h.temp tclsqlite.ovtab.o > > delete.o mkkeywordhash parse.otokenize.o where.o > > expr.o opcodes.c parse.out trigger.o > > func.o opcodes.h parse.yupdate.o > > /mnt/nfs/home/jakub/shsqlite $ > > > > > > Which files are necessary for running, and which for linking to my own C > > programs? > > > > 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> > > > > > > Thank you > > Jakub Ladman > > > > > > > > > > - > > To unsubscribe, send email to [EMAIL PROTECTED] > > > > - > > - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Crosscompiled sqlite was: developer mailing list
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 effectively made a effectively new port it would be a good idea to try and get the tests working - they should pinpoint any areas which aren't working. A list of failing tests should make it easier to track the problem down than a "database locked" from the shell. Martin - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQL error: database is locked
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 error: database is locked sqlite> (sqlite is launched by root) Jakub Ladman - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Crosscompiled sqlite was: developer mailing list
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 > > 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 vacuum.o > > auth.o legacy.o os_unix.o random.o vdbe.o > > btree.olemon os_win.o select.o vdbeapi.o > > build.olempar.c pager.osqlite3vdbeaux.o > > callback.o libsqlite3.a parse.csqlite3.h vdbefifo.o > > complete.o loadext.o parse.htable.ovdbemem.o > > date.o main.o parse.h.temp tclsqlite.ovtab.o > > delete.o mkkeywordhash parse.otokenize.o where.o > > expr.o opcodes.c parse.out trigger.o > > func.o opcodes.h parse.yupdate.o > > /mnt/nfs/home/jakub/shsqlite $ > > > > > > Which files are necessary for running, and which for linking to my own C > > programs? > > > > 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> > > > > > > Thank you > > Jakub Ladman > > > > > > > > > > - > > To unsubscribe, send email to [EMAIL PROTECTED] > > > > - > > - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Re: Quotes in SQLite ?
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 special characters like space etc). 'string literal' "quoted identifier" SQLite adds a few non-standard extensions to this list for compatibility with other database systems. First it allows back quotes around string literals for MySQL compatiblity `extension string literal` and square brackets around quoted identifiers for MS Access compatibility [extension quoted identifier] Then it allowed double quotes around string literals as long as the literal was not also a column name (in whihc case it is interpreted as a standard quoted identifier. "possible string literal or quoted identifier" If you stick to the standard uses you should be OK. In a standard string literal the only character that needs to be escaped is the single quote. This is done by replacing single quotes in the string with a pair of single quotes. See also sqlite3_mprintf. where can I find that (looked in the SQL wiki, but couldn't find it) Try this web page: http://www.sqlite.org/capi3ref.html#sqlite3_mprintf Sorry don't know what "parameterized queries" and "binding strings to parametrs" are, can you give me link where I can find some more information. Read this web page: http://www.sqlite.org/capi3.html HTH Dennis cOte - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] SQL error: database is locked
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 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Crosscompiled sqlite was: developer mailing list
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.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 vacuum.o auth.o legacy.o os_unix.o random.o vdbe.o btree.olemon os_win.o select.o vdbeapi.o build.olempar.c pager.osqlite3vdbeaux.o callback.o libsqlite3.a parse.csqlite3.h vdbefifo.o complete.o loadext.o parse.htable.ovdbemem.o date.o main.o parse.h.temp tclsqlite.ovtab.o delete.o mkkeywordhash parse.otokenize.o where.o expr.o opcodes.c parse.out trigger.o func.o opcodes.h parse.yupdate.o /mnt/nfs/home/jakub/shsqlite $ Which files are necessary for running, and which for linking to my own C programs? 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> Thank you Jakub Ladman - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Re: Re: Quotes in SQLite ?
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 ??, Is that wrong ? You should not be using double quotes around string literals in the first place. It is not valid SQL. SQLite allows it as an extension, but it might lead to unexpected results (if the string literal enclosed in double quotes just accidentally happens to be the same as a column name, it will be interpreted as a column reference). Just don't do it. See also sqlite3_mprintf. where can I find that (looked in the SQL wiki, but couldn't find it) http://sqlite.org/capi3ref.html#sqlite3_mprintf However, I recommend using parameterized queries and binding your strings to parameters. Then you don't need to worry about escaping at all. Sorry don't know what "parameterized queries" and "binding strings to parametrs" are, See sqlite3_bind* can you give me link where I can find some more information. http://sqlite.org/capi3ref.html Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Crosscompiled sqlite was: developer mailing list
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 vacuum.o auth.o legacy.o os_unix.o random.o vdbe.o btree.olemon os_win.o select.o vdbeapi.o build.olempar.c pager.osqlite3vdbeaux.o callback.o libsqlite3.a parse.csqlite3.h vdbefifo.o complete.o loadext.o parse.htable.ovdbemem.o date.o main.o parse.h.temp tclsqlite.ovtab.o delete.o mkkeywordhash parse.otokenize.o where.o expr.o opcodes.c parse.out trigger.o func.o opcodes.h parse.yupdate.o /mnt/nfs/home/jakub/shsqlite $ Which files are necessary for running, and which for linking to my own C programs? 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> Thank you Jakub Ladman - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Re: Quotes in SQLite ?
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 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 ??, Is that wrong ? btw, I'm writing (or maybe I should say "trying to write") another raw database manager (open source), so I must be able to do everything that's legal. See also sqlite3_mprintf. where can I find that (looked in the SQL wiki, but couldn't find it) However, I recommend using parameterized queries and binding your strings to parameters. Then you don't need to worry about escaping at all. Sorry don't know what "parameterized queries" and "binding strings to parametrs" are, can you give me link where I can find some more information. thanks, Stef Mientki Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Re: Quotes in SQLite ?
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 string literals directly into queries. No other characters need to be escaped. See also sqlite3_mprintf. However, I recommend using parameterized queries and binding your strings to parameters. Then you don't need to worry about escaping at all. Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Quotes in SQLite ?
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 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Table Info Pragmas as Virtual Table?
--- 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 the database schema be converted to virtual > > tables? (that would enable joins with sqlite_master and other nice uses > > to get all schema info for a table with a single statement). > > > > Or did some already do something like that? > > There is some code for an sqlite extension in the src/test_schema.c of > the distribution that provides a read-only view of the database schema > as a virtual table. Are there any plans to make all SQLite PRAGMA meta-data information available via virtual tables as part of the standard sqlite library? (with OMIT_META_DATA_IN_VIRTUAL_TABLES and all that?) Everyone could roll their own easily enough, but everyone's implementation would be different. We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Table Info Pragmas as Virtual Table?
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? (that would enable joins with sqlite_master and other nice uses > to get all schema info for a table with a single statement). > > Or did some already do something like that? There is some code for an sqlite extension in the src/test_schema.c of the distribution that provides a read-only view of the database schema as a virtual table. Dan. > Michael > > - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Table Info Pragmas as Virtual Table?
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 schema info for a table with a single statement). Or did some already do something like that? Michael -- Michael Schlenker Software Engineer CONTACT Software GmbH Tel.: +49 (421) 20153-80 Wiener Straße 1-3 Fax:+49 (421) 20153-41 28359 Bremen http://www.contact.de/ E-Mail: [EMAIL PROTECTED] Sitz der Gesellschaft: Bremen | Geschäftsführer: Karl Heinz Zachries Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215 - To unsubscribe, send email to [EMAIL PROTECTED] -