Re: [sqlite] How to create in-memory database?

2007-07-24 Thread Dan Kennedy
On Wed, 2007-07-25 at 09:34 +0530, Bharath Booshan L wrote: > Hi , > > > How do I create an in-memory database? Is there any API related to it? Instead of a file-name for the database, specify the string ":memory:". Dan.

[sqlite] How to create in-memory database?

2007-07-24 Thread Bharath Booshan L
Hi , How do I create an in-memory database? Is there any API related to it? Please advise. Regards, Bharath Booshan L. --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you were

[sqlite] 3.4.1: select with no qualifying rows returns a row of all NULLs

2007-07-24 Thread Andrew Finkenstadt
Using 3.4.0 or 3.4.1 compiled for windows with -DMULTITHREAD, i seem to have a problem where sqlite3_step() will return SQLITE_ROW even when there are, in fact, no rows that meet the WHERE clause criteria. I'm currently attempting a reversion to 3.3.17 to see how it behaved. create table

Re: [sqlite] Saving an in-memory database to file

2007-07-24 Thread Mohd Radzi Ibrahim
How about dumping and import into new db? - Original Message - From: "Colin Manning" <[EMAIL PROTECTED]> To: Sent: Wednesday, July 25, 2007 7:05 AM Subject: [sqlite] Saving an in-memory database to file Hi If I create an in-memory database (by opening

Re: [sqlite] How do I unsubscribe?

2007-07-24 Thread Kees Nuyt
On Tue, 24 Jul 2007 11:59:28 -0400, you wrote: > How do I unsubscribe? >Thanks. > > >NOTICE: If received in error, please destroy and notify sender. Sender does >not intend to waive confidentiality or privilege. Use of this email is

[sqlite] Saving an in-memory database to file

2007-07-24 Thread Colin Manning
Hi If I create an in-memory database (by opening with ":memory:"), then add tables etc to it, is it possible to then write it to a disk file so it can subsequently be used as a file-based db? Thanks -- No virus found in this outgoing message. Checked by AVG. Version: 7.5.476 / Virus

Re: [sqlite] Is this SQL command supported?

2007-07-24 Thread Trevor Talbot
On 7/24/07, Ahmed Sulaiman <[EMAIL PROTECTED]> wrote: That's a real pumper. How do you alter constraints on existing tables ??! You can't. You would need to create a new table with the desired constraints, copy the data into it, drop the old table, and rename the new one. alter table

Re: [sqlite] Begining SQLite

2007-07-24 Thread Meftah Tayeb
Hello, Thank you for this informations i am working with my SQLITE Database Correctly - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] Re: Re: Is this SQL command supported?

2007-07-24 Thread Igor Tandetnik
Ahmed Sulaiman <[EMAIL PROTECTED]> wrote: Thanks for the answer. I have looked into that list and it seems that altering a table for forging constrains is not working as well Yes. The documentation I mentioned tells you as much. How can I change constraints on already existing tables? You

Re[2]: [sqlite] problem with date/time

2007-07-24 Thread Teg
Hello Trevor, Tuesday, July 24, 2007, 4:49:28 PM, you wrote: TT> On 7/24/07, JJ <[EMAIL PROTECTED]> wrote: >> Yes it were returning same number all the time, I've broke down calculations >> of UTC to Julian date type and saw significant floating point errors >> (rounding) in calculation, it

RE: [sqlite] Is this SQL command supported?

2007-07-24 Thread Ahmed Sulaiman
That's a real pumper. How do you alter constraints on existing tables ??! -Original Message- From: Trevor Talbot [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 24, 2007 4:39 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Is this SQL command supported? On 7/24/07, Ahmed Sulaiman

RE: [sqlite] Re: Is this SQL command supported?

2007-07-24 Thread Ahmed Sulaiman
Thanks for the answer. I have looked into that list and it seems that altering a table for forging constrains is not working as well, since I get a similar error on ALTER commands with constraints. How can I change constraints on already existing tables? I 'am trying to run this command: -- Add

Re: [sqlite] problem with date/time

2007-07-24 Thread Trevor Talbot
On 7/24/07, JJ <[EMAIL PROTECTED]> wrote: Yes it were returning same number all the time, I've broke down calculations of UTC to Julian date type and saw significant floating point errors (rounding) in calculation, it couldn't hold such numbers and to me seemed to ignore double data type,

Re: [sqlite] Is this SQL command supported?

2007-07-24 Thread Trevor Talbot
On 7/24/07, Ahmed Sulaiman <[EMAIL PROTECTED]> wrote: I wonder if there any SQL commands that are not supported by SQLite. I am trying to read an entire DDL script file as a string and pass it as one SQL command to SQLite. The same script worked fine in Firebird batch execution. But with SQLite

[sqlite] Re: Is this SQL command supported?

2007-07-24 Thread Igor Tandetnik
Ahmed Sulaiman <[EMAIL PROTECTED]> wrote: I wonder if there any SQL commands that are not supported by SQLite. Yes. See http://sqlite.org/lang.html for a complete documentation of the SQL dialect supported by SQLite. {"SQLite error\r\nnear \"DOMAIN\": syntax error"} CREATE DOMAIN

Re: [sqlite] Is VACUUM safe from power loss/crashing

2007-07-24 Thread drh
scoobyjh <[EMAIL PROTECTED]> wrote: > When VACUUM cleaning a database it creates a temporary file by default in > /var/tmp. What happens when power is lost or unit crashes? Can the database > be correupted or lose data? > VACUUM generates a rollback journal. So losing power in the middle of a

Re: [sqlite] Is VACUUM safe from power loss/crashing

2007-07-24 Thread Dan Kennedy
On Tue, 2007-07-24 at 09:01 -0700, scoobyjh wrote: > When VACUUM cleaning a database it creates a temporary file by default in > /var/tmp. What happens when power is lost or unit crashes? Can the database > be correupted or lose data? It's not supposed to be able to. Essentially, a VACUUM does

[sqlite] Is this SQL command supported?

2007-07-24 Thread Ahmed Sulaiman
I wonder if there any SQL commands that are not supported by SQLite. I am trying to read an entire DDL script file as a string and pass it as one SQL command to SQLite. The same script worked fine in Firebird batch execution. But with SQLite I get an SQLite exception: {"SQLite error\r\nnear

Re: [sqlite] shared cache/ test_server.c

2007-07-24 Thread Ken
John, According to the Sqlite documentation on sqlite3_enable_shared_cache: "There is no mechanism for sharing cache between database connections running in different threads." This means exactly what I said in the first place: You cannot have a "shared cache" access across threads. I

RE: [sqlite] Begining SQLite

2007-07-24 Thread Robert Simpson
> -Original Message- > From: Meftah Tayeb [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 24, 2007 3:04 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Begining SQLite > > Hello > > i create my SQLite Database, but it is blank > ho to Create my Table, view, Query and procedure

[sqlite] Is VACUUM safe from power loss/crashing

2007-07-24 Thread scoobyjh
When VACUUM cleaning a database it creates a temporary file by default in /var/tmp. What happens when power is lost or unit crashes? Can the database be correupted or lose data? thanks and regards, Scooby -- View this message in context:

[sqlite] How do I unsubscribe?

2007-07-24 Thread Anderson, James H \(IT\)
Thanks. NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

Re: [sqlite] SQL logic error when running vacuum;

2007-07-24 Thread scoobyjh
This indeed is the problem! I just did a quick test and created a /var/tmp folder and now vacuum works fine. I can hoover databases to my hearts content Thanks again Dan, Scooby Hi Dan, I am running SQLite on an ARM9 target, cross compiled from windows using the OS_UNIX port out-of-the box

Re: [sqlite] SQL logic error when running vacuum;

2007-07-24 Thread scoobyjh
Hi Dan, I am running SQLite on an ARM9 target, cross compiled from windows using the OS_UNIX port out-of-the box configuration save for defining SQLITE_OMIT_LOAD_EXTENSION. I am calling into SQLite from a test harness I implemented using the native API. I didn't realise that VACUUM generates a

Re: [sqlite] shared cache/ test_server.c

2007-07-24 Thread Joe Wilson
--- John Stanton <[EMAIL PROTECTED]> wrote: > I think that you misunderstood the shared cache description. Cache is > shared by many connections but connections may not be passed between > threads. Each thread must maintain and use its its own connection. In > our case a thread has an

Re: [sqlite] SQL logic error when running vacuum;

2007-07-24 Thread Dan Kennedy
On Tue, 2007-07-24 at 04:22 -0700, scoobyjh wrote: > With OS_UNIX version 3.4.0 (AMALGAMATION), I do the following: > > a) open a database file, it contains one table with 3 records in it. > b) insert 9997 records in side a begin/end transaction > c) delete 9997 records > d) vacuum the database >

Re: [sqlite] shared cache/ test_server.c

2007-07-24 Thread John Stanton
I think that you misunderstood the shared cache description. Cache is shared by many connections but connections may not be passed between threads. Each thread must maintain and use its its own connection. In our case a thread has an associated control block and the connection handle

Re[2]: [sqlite] SQL logic error when running vacuum;

2007-07-24 Thread Teg
Hello scoobyjh, Don't you want sqlite3_exec("VACUUM;") instead of sqlite3_exec("VACUUM") //maybe got error ? I use vacuum from the Sqlite3.exe and it works with the semi-colon. C Tuesday, July 24, 2007, 7:22:33 AM, you wrote: s> With OS_UNIX version 3.4.0 (AMALGAMATION), I do the

Re: [sqlite] problem with date/time

2007-07-24 Thread JJ
Yes it were returning same number all the time, I've broke down calculations of UTC to Julian date type and saw significant floating point errors (rounding) in calculation, it couldn't hold such numbers and to me seemed to ignore double data type, but used float instead. (i've played through

Re: [sqlite] SQL logic error when running vacuum;

2007-07-24 Thread scoobyjh
With OS_UNIX version 3.4.0 (AMALGAMATION), I do the following: a) open a database file, it contains one table with 3 records in it. b) insert 9997 records in side a begin/end transaction c) delete 9997 records d) vacuum the database e) close the database file Whether I use VACUUM on it's own or

Re: [sqlite] Can't run VACUUM command!

2007-07-24 Thread scoobyjh
liigo wrote: > > VACUUM got error... > > sqlite3_open(...) > sqlite3_exec("VACUUM") //maybe got error > sqlite3_close(...) > > If my database has a table that created before sqlite3_open(), > I got the errcode=1, errmsg="SQL logic error or missing the database" > > > I also get this

Re: [sqlite] Begining SQLite

2007-07-24 Thread Meftah Tayeb
Hello i create my SQLite Database, but it is blank ho to Create my Table, view, Query and procedure ? Thank you - To unsubscribe, send email to [EMAIL PROTECTED]

RE: [sqlite] SQLite Version 3.4.1

2007-07-24 Thread Steinmaurer Thomas
Hello, as an pre-excercise for cross-compiling to ARM, I first get used to the whole compile process by compiling SQLite for Linux x86. Downloaded sqlite-3.4.1.tar.gz Then I did the following: tar xzf sqlite-3.4.1.tar.gz cd sqlite-3.4.1 mkdir bld cd bld ../configure make make install This

RE: [sqlite] SQLite Version 3.4.1

2007-07-24 Thread Steinmaurer Thomas
Hi, ___ > > -Original Message- > > From: Steinmaurer Thomas [mailto:[EMAIL PROTECTED] > > Sent: Monday, July 23, 2007 1:12 AM > > To: sqlite-users@sqlite.org > > Subject: RE: [sqlite] SQLite Version 3.4.1 > > > > Hi! > > > > has