Re: [sqlite] datetime bug

2008-06-11 Thread BareFeet
Hi Shane, >> This: select datetime(julianday('2008-06-12','utc'), >> 'localtime'); >> >> should give this: 2008-06-12 00:00:00 >> >> but instead gives: 2008-06-11 24:00:00 > Can you provide some details of your test setup? What version of > SQLite? > What platform (compiler,

Re: [sqlite] datetime bug

2008-06-11 Thread Shane Harrelson
Tom- Can you provide some details of your test setup? What version of SQLite? What platform (compiler, O/S, processor, 32bit vs 64bit, etc.)? I updated the date testscripts in CVS to add tests for you cases below, and they worked correctly for version 3.5.9 of SQLite compiled with both GCC and

Re: [sqlite] Date Selection

2008-06-11 Thread Harold Wood
Hello Igor the create table statement: CREATE TABLE Items ( ID INT NOT NULL PRIMARY KEY ASC, SubCatIdINT NOT NULL, DescriptionVARCHAR(60) NOT NULL, LastUnitPriceNUMERIC(6,2) DEFAULT 0.0, AvgUnitPriceNUMERIC(6,2) DEFAULT 0.0, MinUnitPriceNUMERIC(6,2) DEFAULT 0.0,

[sqlite] datetime bug

2008-06-11 Thread BareFeet
Hi all, Short question: This: select datetime(julianday('2008-06-12', 'utc'), 'localtime') should give this: 2008-06-12 00:00:00 but instead gives this: 2008-06-11 24:00:00 Is this a known bug? More detail: I am storing dates in julianday (real) format. When

Re: [sqlite] SQlite 3.5.9 and Vista 64

2008-06-11 Thread derek walters
Filip, you got it! I have TortoiseSVN installed, and tried it with that process disabled. Wow, I'm glad you found this out; I would have been pulling out my hair for who knows how long. -Derek On Wed, Jun 11, 2008 at 4:38 PM, Filip Navara <[EMAIL PROTECTED]> wrote: > >

Re: [sqlite] Date Selection

2008-06-11 Thread Igor Tandetnik
"Harold Wood" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a table with a date column. I want to select * from > TableA where DateCol Between '2008-06-10' and '2008-06-11'; > when i execute that query i get 0 records. when i remove the date > selection i get all teh

[sqlite] Date Selection

2008-06-11 Thread Harold Wood
I have a table with a date column. I want to select * from TableA where DateCol Between '2008-06-10' and '2008-06-11'; when i execute that query i get 0 records. when i remove the date selection i get all teh records. what is the best way to query on date? thanks Woody

Re: [sqlite] SQLite bug on AFP?

2008-06-11 Thread BareFeet
Following up: >>> I think the solution might be as simple as compiling with - >>> DSQLITE_ENABLE_LOCKING_STYLE=1. This option only works on a Mac. >>> It enables some Apple-contributed code that does file locking that >>> works on AFP as well as on other network filesystems that the Mac

Re: [sqlite] SQlite 3.5.9 and Vista 64

2008-06-11 Thread Filip Navara
http://www.nabble.com/CANTOPEN-error-on-Windows-systems-running-TortoiseSVN-to17656998.html - Filip On Thu, Jun 12, 2008 at 12:46 AM, derek walters <[EMAIL PROTECTED]> wrote: > I have a program that uses sqlite_exec in a loop of about a thousand > queries. In windows XP (32), the program

Re: [sqlite] SQlite 3.5.9 and Vista 64

2008-06-11 Thread D. Richard Hipp
On Jun 11, 2008, at 6:46 PM, derek walters wrote: > I have a program that uses sqlite_exec in a loop of about a thousand > queries. In windows XP (32), the program operates fine, but with > Vista (64) > I get random occurances of SQLITE_CANTOPEN (about 0.5% -- 5 or so -- > of the > 1000

[sqlite] DDL statements in transactions

2008-06-11 Thread Robert Lehr
> On Wed, Jun 11, 2008 at 3:55 PM, Robert Lehr wrote: > > > Oracle does not allow DDL statements [ ... snippage ... ] > > > > PostgreSQL does allow DDL statements [ ... snippage ... ] > > > > Which behaviour is implemented in SQLite? > > > On Wed, Jun 11, 2008 at 4:33 PM, Stephen Oberholtzer

[sqlite] SQlite 3.5.9 and Vista 64

2008-06-11 Thread derek walters
I have a program that uses sqlite_exec in a loop of about a thousand queries. In windows XP (32), the program operates fine, but with Vista (64) I get random occurances of SQLITE_CANTOPEN (about 0.5% -- 5 or so -- of the 1000 queries have this error) as a return from the function when using the

Re: [sqlite] Writing double into a socket file

2008-06-11 Thread Neville Franks
Hi John, Re. Javascript being slow you may be interested in EJScript which is an Embedded Javascript implementation with a Native Code Compiler. See: http://www.ejscript.org/products/ejs/doc/guide/ejs/language/overview.html and http://www.ejscript.org I have not (yet) used it so can't comment

Re: [sqlite] Accessibility dependend on command and folder

2008-06-11 Thread maximi
Great Guys! Big Thanks to all of you! I just set the directory of the calling script to writable and everythings working fine now. and as you suggested: would be great to have an appropriate error-message... Max Fechner Dennis Cote wrote: > > D. Richard Hipp wrote: >> >> Better error

Re: [sqlite] DDL statements in transactions

2008-06-11 Thread Stephen Oberholtzer
On Wed, Jun 11, 2008 at 3:55 PM, Robert Lehr <[EMAIL PROTECTED]> wrote: > Oracle does not allow DDL statements to be executed in transactions, > i.e., it does but the statements are COMMITted as they are executed, > thus cannot be rolled back. > > PostgreSQL does allow DDL statements to be

Re: [sqlite] DDL statements in transactions

2008-06-11 Thread Darren Duncan
Robert Lehr wrote: > Oracle does not allow DDL statements to be executed in transactions, > i.e., it does but the statements are COMMITted as they are executed, > thus cannot be rolled back. > > PostgreSQL does allow DDL statements to be executed in transactions, > i.e., if a DDL query fails then

[sqlite] DDL statements in transactions

2008-06-11 Thread Robert Lehr
Oracle does not allow DDL statements to be executed in transactions, i.e., it does but the statements are COMMITted as they are executed, thus cannot be rolled back. PostgreSQL does allow DDL statements to be executed in transactions, i.e., if a DDL query fails then then entire transaction is

Re: [sqlite] On wheel re-invention (Re: Writing double into a socket file)

2008-06-11 Thread Alex Katebi
Nico, I needed a custom wheel that fit my specifications and gave me complete control. Since my background is networking, it wasn't too hard for me to do. Let me put it this way. If the learning curve is equal or greater than my own implementation I will do my own. I would not attempt to

[sqlite] sqlite3_open returns SQLITE_NOMEM

2008-06-11 Thread Ryan Clark
FWIW, this behavior seems similar to: http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-users/2008-March/001419.html http://tinyurl.com/5w5ttg Ryan ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] On wheel re-invention (Re: Writing double into a socket file)

2008-06-11 Thread Nicolas Williams
On Tue, Jun 10, 2008 at 12:35:14PM -0400, Alex Katebi wrote: > Peter, >I am using my own implementation. I found RPC and others too complicated > to use and it did not give me enough control on the transport layer. I need > my socket to be non-blocking and I am using epoll( ) which is very >

Re: [sqlite] prepare peformances

2008-06-11 Thread toms
just a little up since I have had no answers? I'm still having the pb and cannot understand why? :) Dennis Cote a écrit : > > I am forwarding this to the list in the hope that someone else will > have a good idea since the OP, toms, is having trouble posting himself. > > Dennis Cote > > toms

Re: [sqlite] Writing double into a socket file

2008-06-11 Thread John Stanton
Mutliple threads in one process let me perform load balancing and share the Sqlite cache. Cache sharing can be a big win. Alex Katebi wrote: > Hi John, > > Yes the negative with the single thread is single CPU utilization. Then > again you can run 4 or more servers for a quad CPU. For

[sqlite] sqlite3_open returns SQLITE_NOMEM

2008-06-11 Thread Thomas Wang
Hi, I am writing a program on Windows CE 6.0 that needs some light database use, so tried SQLITE. When I make a call to sqlite3_open(...), I get a return code of SQLITE_NOMEM. The sqlite version used is 3.5.8 in the single source file (amalgamation) My program is developed in Visual C++ 2005

Re: [sqlite] Writing double into a socket file

2008-06-11 Thread John Stanton
We make a JSON object of the selected rows and send it to a client in one network access to minimize network traffic. Suitable for clients with Javascript. Packaging of the object can suit the client. Limits are set to avoid choking the client. Alex Katebi wrote: > Dennis, > > After your

Re: [sqlite] rtree extension question

2008-06-11 Thread Shane Harrelson
On 6/11/08, Christophe Leske <[EMAIL PROTECTED]> wrote: > > Shane Harrelson schrieb: > > Were you able to try this Christophe? I expect it to only be a very > slight > > performance improvement, but I'm still curious as to how much. > > > Shane, > > thanks for getting back to me for this, but I

Re: [sqlite] rtree extension question

2008-06-11 Thread Christophe Leske
Shane Harrelson schrieb: > Were you able to try this Christophe? I expect it to only be a very slight > performance improvement, but I'm still curious as to how much. > Shane, thanks for getting back to me for this, but I haven´t tried this yet. I will do so now. However, i need 7

Re: [sqlite] Accessibility dependend on command and folder

2008-06-11 Thread Dennis Cote
D. Richard Hipp wrote: > > Better error messages are always a good idea. But implementing them, > especially this one, can be much harder than you might expect. > Suggested patches are welcomed. ;-) > Point taken. :-) This actually looks like it might be fairly simple to me. Add a new

Re: [sqlite] rtree extension question

2008-06-11 Thread Shane Harrelson
Were you able to try this Christophe? I expect it to only be a very slight performance improvement, but I'm still curious as to how much. On 6/9/08, Shane Harrelson <[EMAIL PROTECTED]> wrote: > > Each pair of columns (min/max) represents one dimension. So for > latitude/longitude coordinates

Re: [sqlite] quick transaction question

2008-06-11 Thread Igor Tandetnik
Samuel Neff <[EMAIL PROTECTED]> wrote: > If I launch two sqlite3.exe processes to the same database and do > "begin > exclusive" in one and "begin" in the second I do not get a > busy/locked error > in the second (not until you run some other sql like select or > insert). BEGIN statement doesn't

Re: [sqlite] simultaneous transactions

2008-06-11 Thread Igor Tandetnik
Samuel Neff <[EMAIL PROTECTED]> wrote: > using BEGIN IMMEDIATE would prevent this situation from happening, > right? Not in all cases. BEGIN IMMEDIATE acquires a RESERVED lock, which doesn't prevent another connection from acquiring a SHARED lock. The writer may still be unable to promote to

Re: [sqlite] Writing double into a socket file

2008-06-11 Thread Alex Katebi
Hi John, Yes the negative with the single thread is single CPU utilization. Then again you can run 4 or more servers for a quad CPU. For security I could either use SSH Port Forwarding or use a MD5 implementation in my client/server code. Thanks, -Alex On Tue, Jun 10, 2008 at 11:25 PM,

Re: [sqlite] quick transaction question

2008-06-11 Thread Samuel Neff
If I launch two sqlite3.exe processes to the same database and do "begin exclusive" in one and "begin" in the second I do not get a busy/locked error in the second (not until you run some other sql like select or insert). What situation can cause "begin" to get a busy/locked error? (plain begin,

Re: [sqlite] simultaneous transactions

2008-06-11 Thread Samuel Neff
using BEGIN IMMEDIATE would prevent this situation from happening, right? Process 2 would get the lock error when it tries to begin the transaction and thus never obtain a reserved lock which prevented process 1 from promoting to an exclusive lock for commit. Sam

Re: [sqlite] Writing double into a socket file

2008-06-11 Thread Alex Katebi
Dennis, After your explanation the prefixing doesn't look so bad. The client might do lots of queries before it exits. But I can drop that temp table when client does finalize. I have to have a state machine for clients so they don't crash the server by misusing the API anyways. Thank

Re: [sqlite] Accessibility dependend on command and folder

2008-06-11 Thread D. Richard Hipp
On Jun 11, 2008, at 10:07 AM, Dennis Cote wrote: > D. Richard Hipp wrote: >>> i always get the error "unable to open database file", error number >>> is 14 >>> >> >> Probably it is unable to open a temporary file in /tmp or /var/tmp or >> wherever temporary files are suppose to live on your

Re: [sqlite] Accessibility dependend on command and folder

2008-06-11 Thread Dennis Cote
D. Richard Hipp wrote: >> i always get the error "unable to open database file", error number >> is 14 >> > > Probably it is unable to open a temporary file in /tmp or /var/tmp or > wherever temporary files are suppose to live on your system. > This situation seems to come up fairly often.

Re: [sqlite] Writing double into a socket file

2008-06-11 Thread Dennis Cote
Alex Katebi wrote: > However there are two things I don't like about this method. One is that I > need to parse the prepared statments and prefix queries, and replace the > table name with the temp table name in the surrogate query. Two is that if > the client does lots of queries before