[sqlite] Sqllite As server

2006-01-31 Thread Vishal Kashyap
Dear All, We have an existing Sqlite application which till now was fine running on single machine. Now we need flexibility of client server model. Is this possible with Sqlite ? . Or alternatively is it possible to use Sqlite db file from shared drives. -- With Best Regards, Vishal Kashyap. htt

[sqlite] Need advice/understanding on indices

2006-01-31 Thread Michael Bell
Thanks for any responses to the following: Imagine a sqlite db with the core table of about 1-2 million rows, total size=about 4 gigs. Want to show a page or so at a time on a web based app. == Table structure == The core table is something like CREATE TABLE Main(ID TEXT,Date I

Re: [sqlite] Auto Increment?

2006-01-31 Thread Carl Jacobs
> Quoting Dennis Cote ([EMAIL PROTECTED]): > > Doesn't this mean that SQLite only supports 2^63 rows with autoincrement? > > That means you can insert one row per millisecond for 29 million years. Well actually, not quite. The website states that the database size is limited to 2^41 bytes. http://

Re: [sqlite] Auto Increment?

2006-01-31 Thread Paul Tomblin
Quoting Dennis Cote ([EMAIL PROTECTED]): > Doesn't this mean that SQLite only supports 2^63 rows with autoincrement? That means you can insert one row per millisecond for 29 million years. -- Paul Tomblin <[EMAIL PROTECTED]> http://xcski.com/blogs/pt/ In any business, the customer is always righ

Re: [sqlite] Disk IO error on AIX

2006-01-31 Thread Robert Tortajada
[EMAIL PROTECTED] wrote: Robert Tortajada <[EMAIL PROTECTED]> wrote: The bad return from fsync is -1 so I am not sure that will be helpfull. However, couldn't we just disable DIRSYNC since that seems to be the issue? Yeah. Just disable DIRSYNC. This will slightly increase the risk

Re: [sqlite] Auto Increment?

2006-01-31 Thread Dennis Cote
[EMAIL PROTECTED] wrote: The rowid does *not* wrap if you specify AUTOINCREMENT. Once the maximum rowid is used, all subsequent insert attempts return SQLITE_FULL. The regression test suite contains a test for this. Different rules apply if you do not use AUTOINCREMENT. There is a #define th

Re: [sqlite] LIKE syntax with BLOBs

2006-01-31 Thread Dennis Cote
[EMAIL PROTECTED] wrote: Shane Baker <[EMAIL PROTECTED]> wrote: I have BLOBs in my schema and the data will often start with bytes of 0 value. I'm having a tough time coming up with the proper SQL syntax to select all the columns that start with 2 0's (or any zeros). I have tried: SELECT

Re: [sqlite] Auto Increment?

2006-01-31 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > > > > >Hmmm... In the later versions of sqlite with 64-bit ROWID values, doesn't it > >treat them as unsigned? It sure seems that autoincremented rowid values > >should always be positive...??? > > > > > > > No, SQLite tr

Re: [sqlite] Disk IO error on AIX

2006-01-31 Thread drh
Robert Tortajada <[EMAIL PROTECTED]> wrote: > > > The bad return from fsync is -1 so I am not sure that will be helpfull. > However, couldn't we just disable DIRSYNC since that seems to be the issue? > Yeah. Just disable DIRSYNC. This will slightly increase the risk of database corruption foll

Re: [sqlite] Auto Increment?

2006-01-31 Thread Dennis Cote
Jim C. Nasby wrote: On Tue, Jan 31, 2006 at 10:05:47AM -0700, Dennis Cote wrote: [EMAIL PROTECTED] wrote: CREATE TABLE x(i INTEGER PRIMARY KEY AUTOINCREMENT CHECK(i < (1<<32))); I suspect you'll see better performance if you hard-code the value instead of doing a bit-shift every time

Re: [sqlite] Auto Increment?

2006-01-31 Thread Dennis Cote
[EMAIL PROTECTED] wrote: Hmmm... In the later versions of sqlite with 64-bit ROWID values, doesn't it treat them as unsigned? It sure seems that autoincremented rowid values should always be positive...??? No, SQLite treats them as 64 bit signed integers. The first 2^63 values are posit

Re: [sqlite] Disk IO error on AIX

2006-01-31 Thread Robert Tortajada
[EMAIL PROTECTED] wrote: Robert Tortajada <[EMAIL PROTECTED]> wrote: The following snipit is where the error is generated. #ifndef SQLITE_DISABLE_DIRSYNC if( full_fsync(pFile->dirfd, pFile->fullSync, 0) ){ return SQLITE_IOERR; OK. Good information. We are narrowing down

Re: [sqlite] Decimal separator

2006-01-31 Thread Marian Olteanu
The localization problem is a complex problem. Indeed, any big database system _should_ implement it. And yes, it can be implemented in sqlite, and it can be activated through a PRAGMA directive. But implementing it into sqlite (localization is not limited to numbers) would increase the size of

Re: [sqlite] Disk IO error on AIX

2006-01-31 Thread drh
Robert Tortajada <[EMAIL PROTECTED]> wrote: > > > The following snipit is where the error is generated. > > #ifndef SQLITE_DISABLE_DIRSYNC > if( full_fsync(pFile->dirfd, pFile->fullSync, 0) ){ > return SQLITE_IOERR; > OK. Good information. We are narrowing down the problem. Now, c

Re: [sqlite] Decimal separator

2006-01-31 Thread drh
Bert Verhees <[EMAIL PROTECTED]> wrote: > It is only the English speaking part of the world using Arabic numerals > is a '.', which is a minority > The rest uses a ',' > SQLite uses "." as the radix point always. This is by design. It used to use the locale specific radix point, but that led to

Re: [sqlite] Decimal separator

2006-01-31 Thread Bert Verhees
Will Leshner wrote: On Jan 31, 2006, at 1:42 PM, Bert Verhees wrote: It is only the English speaking part of the world using Arabic numerals is a '.', And the Japanese speaking world :) Yuo are right, and the South American speaking Spanish also But the South American speaking Portugue

Re: [sqlite] Disk IO error on AIX

2006-01-31 Thread Robert Tortajada
[EMAIL PROTECTED] wrote: Robert Tortajada <[EMAIL PROTECTED]> wrote: Hello, I am trying to get sqlite to work on AIX 5.3. It seemed to compile fine and I can access my db file and do selects. However, any kind of update or create will fail with the following error: sunjin:/usr/local> .

Re: [sqlite] Decimal separator

2006-01-31 Thread Will Leshner
On Jan 31, 2006, at 1:42 PM, Bert Verhees wrote: It is only the English speaking part of the world using Arabic numerals is a '.', And the Japanese speaking world :) -- REALbasic news and tips: http://rbgazette.com KidzMail & KidzBlog: http://haranbanjo.com

Re: [sqlite] Decimal separator

2006-01-31 Thread Bogusław Brandys
Bert Verhees wrote: Carl Jacobs wrote: All would be fine but look at this : create table test( price double, amount double default 0 ); insert into test(price) values("12,0"); amount now = 0.0 The world seems to have settled on using Arabic numerals 0, 1, 2 ... 9. I think we should t

RE: [sqlite] Java bindings

2006-01-31 Thread Marian Olteanu
Thank you very much! I'll try to compile it also in Linux. If it works, I'm set. If it doesn't, back to square one. On Tue, 31 Jan 2006, Tim Anderson wrote: -Original Message- From: Marian Olteanu [mailto:[EMAIL PROTECTED] Sent: 31 January 2006 05:14 To: sqlite-users@sqlite.org Subj

Re: [sqlite] Decimal separator

2006-01-31 Thread Bert Verhees
Carl Jacobs wrote: All would be fine but look at this : create table test( price double, amount double default 0 ); insert into test(price) values("12,0"); amount now = 0.0 The world seems to have settled on using Arabic numerals 0, 1, 2 ... 9. I think we should think about settling

Re: [sqlite] Decimal separator

2006-01-31 Thread Carl Jacobs
> > All would be fine but look at this : > > > > create table test( > > price double, > > amount double default 0 > > ); > > > > insert into test(price) values("12,0"); > > > > amount now = 0.0 The world seems to have settled on using Arabic numerals 0, 1, 2 ... 9. I think we should think about s

Re: [sqlite] Decimal separator

2006-01-31 Thread Paul Tomblin
Quoting Bogus?aw Brandys ([EMAIL PROTECTED]): > All would be fine but look at this : > > create table test( > price double, > amount double default 0 > ); > > > insert into test(price) values("12,0"); > > amount now = 0.0 Let's see - you insert 12,0 in the column "price", and you're complainin

Re: [sqlite] Decimal separator

2006-01-31 Thread Bogusław Brandys
Bogusław Brandys wrote: Bogusław Brandys wrote: Hello, Maybe someone could explain me how to properly store float/decimal values into sqlite 3.X database ? I created test table: create table test(number double); insert into test(number) values(11); Now it looks like: 11.0 so, '.' seems

Re: [sqlite] Decimal separator

2006-01-31 Thread Robert Simpson
- Original Message - From: "Bogusław_Brandys" <[EMAIL PROTECTED]> Hello, Maybe someone could explain me how to properly store float/decimal values into sqlite 3.X database ? I created test table: create table test(number double); insert into test(number) values(11); Now it looks li

Re: [sqlite] Decimal separator

2006-01-31 Thread Bogusław Brandys
Bogusław Brandys wrote: Hello, Maybe someone could explain me how to properly store float/decimal values into sqlite 3.X database ? I created test table: create table test(number double); insert into test(number) values(11); Now it looks like: 11.0 so, '.' seems to be always decimal sepa

[sqlite] Decimal separator

2006-01-31 Thread Bogusław Brandys
Hello, Maybe someone could explain me how to properly store float/decimal values into sqlite 3.X database ? I created test table: create table test(number double); insert into test(number) values(11); Now it looks like: 11.0 so, '.' seems to be always decimal separator. But under my Wind

Re: [sqlite] Intel compiler warnings with 3.3.3

2006-01-31 Thread drh
=?iso-8859-1?Q?Miguel_Angel_Latorre_D=EDaz?= <[EMAIL PROTECTED]> wrote: > I will point out only some kind of warnings I saw (i.e. not signed vs > unsigned) using the Intel Compiler: > Thank you for sending the warnings. I patched a few of the warnings. None of the warnings was a real bug. All

[sqlite] Intel compiler warnings with 3.3.3

2006-01-31 Thread Miguel Angel Latorre Díaz
I will point out only some kind of warnings I saw (i.e. not signed vs unsigned) using the Intel Compiler: os_win.c .\Sqlite\v3\os_win.c(1482): warning #300: const variable "zeroData" requires an initializer static const ThreadData zeroData; ^ the patch was

Re: [sqlite] Auto Increment?

2006-01-31 Thread Jim C. Nasby
On Tue, Jan 31, 2006 at 10:05:47AM -0700, Dennis Cote wrote: > [EMAIL PROTECTED] wrote: > CREATE TABLE x(i INTEGER PRIMARY KEY AUTOINCREMENT CHECK(i < (1<<32))); I suspect you'll see better performance if you hard-code the value instead of doing a bit-shift every time you insert. -- Jim C. Nasby,

Re: [sqlite] Disk IO error on AIX

2006-01-31 Thread drh
Robert Tortajada <[EMAIL PROTECTED]> wrote: > Hello, I am trying to get sqlite to work on AIX 5.3. It seemed to > compile fine and I can access my db file and do selects. However, any > kind of update or create will fail with the following error: > > sunjin:/usr/local> ./bin/sqlite3 gg.db >

Re: [sqlite] LIKE syntax with BLOBs

2006-01-31 Thread drh
Shane Baker <[EMAIL PROTECTED]> wrote: > I have BLOBs in my schema and the data will often start with bytes of 0 > value. > > I'm having a tough time coming up with the proper SQL syntax to select all > the columns that start with 2 0's (or any zeros). > > I have tried: > > SELECT * FROM mytable

[sqlite] Disk IO error on AIX

2006-01-31 Thread Robert Tortajada
Hello, I am trying to get sqlite to work on AIX 5.3. It seemed to compile fine and I can access my db file and do selects. However, any kind of update or create will fail with the following error: sunjin:/usr/local> ./bin/sqlite3 gg.db SQLite version 3.3.2 Enter ".help" for instruction

Re: [sqlite] Auto Increment?

2006-01-31 Thread Derrell . Lipman
Dennis Cote <[EMAIL PROTECTED]> writes: > Derrell, > > If you are using SQLite 3.3.0 or newer then you can do the same thing in a > more direct manner using a CHECK constraint. > > CREATE TABLE x(i INTEGER PRIMARY KEY AUTOINCREMENT CHECK(i < (1<<32))); Hehe. I'm using 2.8.16 for most of my work,

[sqlite] LIKE syntax with BLOBs

2006-01-31 Thread Shane Baker
I have BLOBs in my schema and the data will often start with bytes of 0 value. I'm having a tough time coming up with the proper SQL syntax to select all the columns that start with 2 0's (or any zeros). I have tried: SELECT * FROM mytable WHERE myblob LIKE 0%; SELECT * FROM mytable WHERE myblo

Re: [sqlite] How can i see if an query uses an index ?

2006-01-31 Thread Dennis Cote
Jon Friis wrote: Hi all I have the following table + index CREATE TABLE O_YDLRK_CK91_HIST ( ISIN TEXT NULL, BOERS_DATODATE NOT NULL, TERM_DATO DATE NOT NULL, AFDRAG_BELOEB REAL NULL, RENTE_BELOEB REAL NULL, CONSTRAINT XPKO_

Re: [sqlite] Auto Increment?

2006-01-31 Thread Dennis Cote
[EMAIL PROTECTED] wrote: chetana bhargav <[EMAIL PROTECTED]> writes: Auto increment seems to return a unsigned long long is there any way for it to make it as 32 bit, as I am depending on this feilds to generate unique id, and i have a constraint fot the id to be 32 bit only. You'll

Re: [sqlite] Sqlite powered Web Sites

2006-01-31 Thread ara . t . howard
On Tue, 31 Jan 2006, Clint Bailey wrote: Can anyone point me to web sites that are powered by Sqlite? I'm curious as to how they function as compared to a MySQL, or brand M$ powered site. check out the ruby on rails list - their are a few rails sites out there using sqlite. -a -- happiness

Re: [sqlite] Sqlite powered Web Sites

2006-01-31 Thread Clay Dowling
Clint Bailey said: > Can anyone point me to web sites that are powered by Sqlite? I'm curious > as to how they function as compared to a MySQL, or brand M$ powered site. http://www.ceamus.com Of course, you aren't going to see the guts of its SQLite access from this perspective. But as a regul

Re: [sqlite] Sqlite powered Web Sites

2006-01-31 Thread drh
Clint Bailey <[EMAIL PROTECTED]> wrote: > Can anyone point me to web sites that are powered by Sqlite? I'm curious > as to how they function as compared to a MySQL, or brand M$ powered site. > http://www.sqlite.org/ is built on top of CVSTrac (http://www.cvstrac.org/) which uses SQLite version

Re: [sqlite] Sqlite powered Web Sites

2006-01-31 Thread emilia12
Цитат на писмо от Clint Bailey <[EMAIL PROTECTED]>: > Can anyone point me to web sites that are powered by > Sqlite? I'm curious > as to how they function as compared to a MySQL, or brand > M$ powered site. > > > yes - www.sqlite.org - Slon.bg ™ Симпатичният магази

Re: [sqlite] Sqlite powered Web Sites

2006-01-31 Thread Derrell . Lipman
Clint Bailey <[EMAIL PROTECTED]> writes: > Can anyone point me to web sites that are powered by Sqlite? I'm curious as > to how they function as compared to a MySQL, or brand M$ powered site. How about http://sqlite.org ? Derrell

Re: [sqlite] Fwd: Does SQLite provide XML support

2006-01-31 Thread Clay Dowling
pavan savoy said: > #db2xml test.db test.xml > > which converts test.db database to XML format. I dont really care abt DTD, > stuff and all. I just want it to be converted. Thats it ... It really depends on what you want to find in that XML file. I already have a tool at http://www.ceamus.com/o

[sqlite] Sqlite powered Web Sites

2006-01-31 Thread Clint Bailey
Can anyone point me to web sites that are powered by Sqlite? I'm curious as to how they function as compared to a MySQL, or brand M$ powered site.

Re: [sqlite] Auto Increment?

2006-01-31 Thread Derrell . Lipman
chetana bhargav <[EMAIL PROTECTED]> writes: > Auto increment seems to return a unsigned long long is there any way for it > to make it as 32 bit, as I am depending on this feilds to generate unique > id, and i have a constraint fot the id to be 32 bit only. You'll have to add enough rows to the t

[sqlite] Fwd: Does SQLite provide XML support

2006-01-31 Thread pavan savoy
-- Forwarded message -- From: pavan savoy <[EMAIL PROTECTED]> Date: Jan 31, 2006 7:17 PM Subject: Does SQLite provide XML support To: [EMAIL PROTECTED] Hi, I searched through your FAQ's mailing list, but the answer nor the question is not this simple. Hence I just wan

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
I used the fuser and lsof commands and found out that no other process is accessing the database file. So it seems that the assumption of another process accessing the file was wrong. Though the problem still remains unsolved. Thanks Ritesh On Tue, 2006-01-31 at 18:02, Christian Smith wrote: >

[sqlite] Re: Auto Increment?

2006-01-31 Thread Igor Tandetnik
chetana bhargav wrote: Auto increment seems to return a unsigned long long is there any way for it to make it as 32 bit, as I am depending on this feilds to generate unique id, and i have a constraint fot the id to be 32 bit only. Autoincrement field starts at 1 and increments by 1 with each ne

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
I've tried to copy/paste and simplify the code. Please assume that the sql query on line #19 is correct, its actually longer so i truncated it. getDB() returns _db. I checked the value of _db after the sqlite3_open() fn call its a valid handle. I'm trying to understand fuser and lsof commands a

Re: [sqlite] Database Locked Error

2006-01-31 Thread Christian Smith
On Tue, 31 Jan 2006, Ritesh Kapoor wrote: >Regarding the configuration of NFS - >I have two machines with NFS on them. >- if i run the app on machine 1 it works properly >- now when i run the app on machine 2 it works properly > >But if I login to machine 2 from machine 1 and then run the app I ge

RE: [sqlite] Java bindings

2006-01-31 Thread Tim Anderson
> -Original Message- > From: Marian Olteanu [mailto:[EMAIL PROTECTED] > Sent: 31 January 2006 05:14 > To: sqlite-users@sqlite.org > Subject: [sqlite] Java bindings > any success. I failed to compile > http://www.ch-werner.de/javasqlite and > in Windows. I've compiled this for Window

RE: [sqlite] Java bindings

2006-01-31 Thread Tim Anderson
> -Original Message- > From: Marian Olteanu [mailto:[EMAIL PROTECTED] > Sent: 31 January 2006 05:14 > To: sqlite-users@sqlite.org > Subject: [sqlite] Java bindings > any success. I failed to compile > http://www.ch-werner.de/javasqlite and > in Windows. I've compiled this for Window

Re: [sqlite] READ UNCOMMITTED isolation?

2006-01-31 Thread Christian Smith
On Mon, 30 Jan 2006, Gerhard Häring wrote: >[EMAIL PROTECTED] wrote: >> "Dan Petitt" <[EMAIL PROTECTED]> wrote: >> >>>I think (looking at the source) that it's a pragma, but I don't know when >>>you set it, once when DB is opened, on each write or on each read. >>> >>>You are the third to ask (inc

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
Please ommit line #18 from the sequence of statements and then reply. Thanks Ritesh On Tue, 2006-01-31 at 16:42, Ritesh Kapoor wrote: > Regarding the configuration of NFS - > I have two machines with NFS on them. > - if i run the app on machine 1 it works properly > - now when i run the app on ma

Re: [sqlite] Database Locked Error

2006-01-31 Thread Ritesh Kapoor
Regarding the configuration of NFS - I have two machines with NFS on them. - if i run the app on machine 1 it works properly - now when i run the app on machine 2 it works properly But if I login to machine 2 from machine 1 and then run the app I get the 'database is locked' error message. The se

[sqlite] Auto Increment?

2006-01-31 Thread chetana bhargav
Auto increment seems to return a unsigned long long is there any way for it to make it as 32 bit, as I am depending on this feilds to generate unique id, and i have a constraint fot the id to be 32 bit only. __ Do You Yahoo!? Tired of spam? Yahoo

[sqlite] PRAGMA case_sensitive_like

2006-01-31 Thread Aidan Reel
Hi I am writing a wrapper around version 3.2.8 taken from the starkit , I have implemented and unit tested execution of queries and commands. I am now providing methods for the various PRAGMAs. I have implemented and successfully unit tested PRAGMAs such as auto_vacuum and count_changes. I basic