Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread D. Richard Hipp
On Fri, 2005-04-15 at 19:02 -0400, Clay Dowling wrote: > James Berry wrote: > > > It would be useful to use bound parameters in such cases. > > > > Might it make sense to coerce the value at runtime into a string > > value in such a case? I believe a similar restriction (ticket #1096: > >

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread Nuno Lucas
[16-04-2005 1:16, James Berry escreveu] I'm not the OP, but I'm simply suggesting that it would be, in general, really nice if the architecture could allow bound parameters for many more of these cases. Not to the point of keyword substitution (that would change meaning of a statement) but

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread James Berry
On Apr 15, 2005, at 4:02 PM, Clay Dowling wrote: James Berry wrote: It would be useful to use bound parameters in such cases. Might it make sense to coerce the value at runtime into a string value in such a case? I believe a similar restriction (ticket #1096: limit and offset) was recently

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread Clay Dowling
James Berry wrote: It would be useful to use bound parameters in such cases. Might it make sense to coerce the value at runtime into a string value in such a case? I believe a similar restriction (ticket #1096: limit and offset) was recently lifted to allow bound parameters in those cases,

Re: [sqlite] api questions about data lifetimes

2005-04-15 Thread Brian Swetland
[Austin Gilbert <[EMAIL PROTECTED]>] > Not to discourage you from rolling your own, but what about CppSQLite?? > www.codeproject.com/database/CppSQLite.asp Well, it seems a little windows-centric and a little big for my needs. I already have code that works and I'm happy with. Just trying to be

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread Darren Duncan
I believe that exactly the right circumstances to allow bound parameters is all of the same places where literal values are allowed, namely strings, numbers, nulls, etc. It does not make sense to have bound parameters in any other situation. -- Darren Duncan

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread James Berry
On Apr 15, 2005, at 4:16 PM, D. Richard Hipp wrote: On Fri, 2005-04-15 at 15:49 -0700, Cory Nelson wrote: It seems when a bind a string to "attach ? as dbname", it is never translated into the final statement. Is this supposed to happen? SQLite only allows bound parameters in places where it is

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread D. Richard Hipp
On Fri, 2005-04-15 at 15:49 -0700, Cory Nelson wrote: > It seems when a bind a string to "attach ? as dbname", it is never > translated into the final statement. Is this supposed to happen? > SQLite only allows bound parameters in places where it is legal to put an expression. Remember that

Re: [sqlite] Uclibc prob

2005-04-15 Thread D. Richard Hipp
On Fri, 2005-04-15 at 16:27 +, Rui Silva wrote: > hi ppl, > > i'm new to sqlite and i was trying to use sqlite under a uclibc system. > the version i'm using is 3.2.1-r1 and when i run sqlite3 test.db i get > a segmentation fault. > > does sqlite works with uclibc??? is it just a a sqlite3

Re: [sqlite] multi threading

2005-04-15 Thread D. Richard Hipp
On Fri, 2005-04-15 at 14:44 +0300, Cosmin Vlasiu wrote: > Hello to everyone, > > I have a question... regarding multi-threading... > the question is for microsoft windows (a visual c++ application)... I saw > the documentation > and I understood that for microsoft OS, the multi-threading is

[sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread Cory Nelson
It seems when a bind a string to "attach ? as dbname", it is never translated into the final statement. Is this supposed to happen? -- Cory Nelson http://www.int64.org

[sqlite] Uclibc prob

2005-04-15 Thread Rui Silva
hi ppl, i'm new to sqlite and i was trying to use sqlite under a uclibc system. the version i'm using is 3.2.1-r1 and when i run sqlite3 test.db i get a segmentation fault. does sqlite works with uclibc??? is it just a a sqlite3 error or the main lib prob?? thks -- Rui Silva Powered by

Re: [sqlite] Copying a table between databases

2005-04-15 Thread Jay Sprenkle
There's an option on the create table sql to do this. I believe it's create table x as select * from y; On 4/14/05, Dennis Volodomanov <[EMAIL PROTECTED]> wrote: > Thank you Derrell and Cory, > > I can create triggers when I create the database file and I'm not using > indexes in this

Re: [sqlite] Multiple Tables on one Flat File

2005-04-15 Thread Uriel_Carrasquilla
Got it. Thank you. Eric did point it out as well. In summary, do all my creates, then do all my prepares, then do all my executes with the dummy @bind (? ?) fields. Finally, I proceed to do my true executes and commits. Regards, [EMAIL PROTECTED] NCCI Boca Raton, Florida 561.893.2415

Re: Re: [sqlite] optimize table

2005-04-15 Thread Jay Sprenkle
Since you produce the statistics once per month on a schedule it would be more efficient to not have an index. The index will slow down daily operations each time a record is inserted. Copy the database file once per month to a 'snapshot' file. Add the index to the snapshot database and then

Re: [sqlite] How to Embed SQLite in VC++

2005-04-15 Thread Clay Dowling
Mahendra Batra said: > Someone, plz tell me how could i embed SQLite. I included sqlite.h but > getting unresolved errors i.e the definition of functions like > sqlite3_open(..) and sqlite3_exec(..) can not be found. > Please favor me as soon as possible. In general the actual error

Re: [sqlite] libreadline.so error undefined reference.

2005-04-15 Thread Mike Shaver
On 4/15/05, Cem Vedat ISIK <[EMAIL PROTECTED]> wrote: > ./.libs/libsqlite3.so: undefined reference to `sqlite3KeywordCode' Can't help you with that, but: > /opt/eldk/usr/../ppc_8xx/usr/lib/libreadline.so: undefined reference to > `tgoto' > /opt/eldk/usr/../ppc_8xx/usr/lib/libreadline.so:

Re: Re: [sqlite] optimize table

2005-04-15 Thread msaka msaka
have you some feeling on my problem? cut or not cut db files? >-PÃvodnà sprÃva- >Od: D. Richard Hipp [mailto:[EMAIL PROTECTED] >OdoslanÃ: 15. aprÃla 2005 11:15 >Komu: sqlite-users@sqlite.org >Predmet: Re: [sqlite] optimize table > > >On Fri, 2005-04-15 at 06:15 -0400, Ken & Deb Allen

[sqlite] multi threading

2005-04-15 Thread Cosmin Vlasiu
Hello to everyone, I have a question... regarding multi-threading... the question is for microsoft windows (a visual c++ application)... I saw the documentation and I understood that for microsoft OS, the multi-threading is enabled by default. So, of course I start two threads, both of them

RE: [sqlite] Problem storing integers

2005-04-15 Thread D. Richard Hipp
On Fri, 2005-04-15 at 10:53 +0100, Richard Boulton wrote: > > I'm running the latest sqlite 3.2.1 command line tool on Windows > > XP > > I've just run some older versions of the command line tool and the last time > the value 281474976710655 was stored correctly was 3.0.8 I was missing a >

Re: [sqlite] optimize table

2005-04-15 Thread D. Richard Hipp
On Fri, 2005-04-15 at 06:15 -0400, Ken & Deb Allen wrote: > I cannot speak for SQLITE for certain, but I know with a number of > commercial RDBMS packages the index is not used unless it contains a > sufficient degree of distribution. > SQLite does not do this. It makes no effort to keep

Re: [sqlite] vacuum

2005-04-15 Thread D. Richard Hipp
On Fri, 2005-04-15 at 09:53 +0200, Eggert Henri wrote: > Hi sqlite-users :) > > Deleting records in a sqlite db leaves unused blocks which are free'd by > vacuum. > > Whithout doing vacuum , does inserting new records use the wasted space > , or remains wasted space for ever. > Unused space

Re: [sqlite] optimize table

2005-04-15 Thread Ken & Deb Allen
P.S. When experimenting with this, try naming this 'second' table first to reduce the work the database has to do in selecting/rejecting records. Ypu can experiment with this by creating this new table, populating it with a SELECT from the existing table (only the records without statistics),

Re: [sqlite] optimize table

2005-04-15 Thread Ken & Deb Allen
I cannot speak for SQLITE for certain, but I know with a number of commercial RDBMS packages the index is not used unless it contains a sufficient degree of distribution. Microsoft SQL Server, for example, is quite explicit in stating that if the distribution of values across the range of

RE: [sqlite] Problem storing integers

2005-04-15 Thread Richard Boulton
> I'm running the latest sqlite 3.2.1 command line tool on Windows > XP I've just run some older versions of the command line tool and the last time the value 281474976710655 was stored correctly was 3.0.8 I was missing a couple of releases after 3.0.8 but saw the unexpected behaviour start in

Re: Re: [sqlite] optimize table

2005-04-15 Thread msaka msaka
i dont need working with dates and times.. i only set 1 records on which was done.. which index is better to create for this problem? must i cut db files? or speed of statistic will be same now and after 1000 000 records? >-Pôvodná správa- >Od: Gert Rijs [mailto:[EMAIL PROTECTED]

[sqlite] libreadline.so error undefined reference.

2005-04-15 Thread Cem Vedat ISIK
Hi everybody, I'm trying to cross compile sqlite for PowerPC using ppc_8xx-gcc on ELDK, I've edited Makefile and libtool by hand, but I'm stuck at this point. ./libtool --mode=link ppc_8xx-gcc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src -DNDEBUG -DSQLITE_OMIT_CURSOR -DHAVE_READLINE=1

[sqlite] vacuum

2005-04-15 Thread Eggert Henri
Hi sqlite-users :) Deleting records in a sqlite db leaves unused blocks which are free'd by vacuum. Whithout doing vacuum , does inserting new records use the wasted space , or remains wasted space for ever. Thanks a lot for any help! With kind regards Henri

[sqlite] optimize table

2005-04-15 Thread msaka msaka
hi i create cashdesk system with sqlite 3. my qustions are: i insert sales into table sale: CREATE TABLE sale( id INTEGER NOT NULL UNIQUE PRIMARY KEY, bill_no integer, bill_item_no integer, item_name varchar(20), qty integer, amount DOUBLE, statistic integer ) table with

Re: [sqlite] How to Embed SQLite in VC++

2005-04-15 Thread alok
you forget to include defination of sqlite3_open and sqlite3_exec in your application if you like i can send you release version of sqlite.lib which you can easily include in your project With Regards Alok Gupta Visit me at http://alok.bizhat.com "I Believe this will