Re: [sqlite] image upload to db trouble

2009-11-12 Thread Artur Reilin
> //echo $images; >$db = new PDO('sqlite: database.sqlite3'); > >$con = sqlite_open('sqlite: database.sqlite3'); > if (!$con) > { > die('Could not connect: ' . mysql_error()); > } why you first make a new db opject and then open an connection to the database? new PDO

[sqlite] APSW 3.6.20-r1 released

2009-11-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 APSW is a wrapper around SQLite that provides all SQLite API functionality in Python. It also has an interactive shell so you don't have to use Python. The home page is http://code.google.com/p/apsw/ which includes a changelog. New in this release is

Re: [sqlite] Output in currency format

2009-11-12 Thread Dan Bishop
Simon Slavin wrote: > On 13 Nov 2009, at 3:30am, Roger Binns wrote: > > >> Simon Slavin wrote: >> >>> Integers in all languages I'm aware of are not stored as mantissa/exponent, >>> they're stored as bits with complete precision. >>> >> There is one huge exception I found out the

Re: [sqlite] Converting .dbf to SQLite

2009-11-12 Thread Alex Mandel
Using R might actually be a convenient way to do it all in essentially one step, and technically batch scriptable. You'd need the RSQlite add on package, I think dbf reading is built in. Alex dave lilley wrote: > 2009/11/12 Rich Shepard > >> On Thu, 12 Nov 2009, dave

Re: [sqlite] Output in currency format

2009-11-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon Slavin wrote: > JavaScript doesn't have an integer type, just a number type: You are agreeing with me :-) Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

Re: [sqlite] Output in currency format

2009-11-12 Thread Simon Slavin
On 13 Nov 2009, at 3:30am, Roger Binns wrote: > Simon Slavin wrote: >> Integers in all languages I'm aware of are not stored as mantissa/exponent, >> they're stored as bits with complete precision. > > There is one huge exception I found out the hard way recently: Javascript > stores all

Re: [sqlite] Output in currency format

2009-11-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon Slavin wrote: > Integers in all languages I'm aware of are not stored as mantissa/exponent, > they're stored as bits with complete precision. There is one huge exception I found out the hard way recently: Javascript stores all 'integers' as

Re: [sqlite] Output in currency format

2009-11-12 Thread Simon Slavin
On 13 Nov 2009, at 12:34am, Nicolas Williams wrote: > On Thu, Nov 12, 2009 at 11:40:23PM +, Simon Slavin wrote: >> There's still some possibility for confusion, however: how many places >> of decimals do you use for each currency ? As far as I know, no >> currently traded currency uses more

Re: [sqlite] Will sqlite flush the change to the disk when page cache is full?

2009-11-12 Thread Igor Tandetnik
pierr wrote: > I have a impression that sqlite will flush the change to the disk when the > page cache is full even if the "COMMIT" command has not been issued during > the transction. Yes. > If this is true, will this violate the isolation properity > of a transction No. > as other parallel

[sqlite] Will sqlite flush the change to the disk when page cache is full?

2009-11-12 Thread pierr
Hi, I have a impression that sqlite will flush the change to the disk when the page cache is full even if the "COMMIT" command has not been issued during the transction. If this is true, will this violate the isolation properity of a transction as other parallel transction would be able the

Re: [sqlite] Output in currency format

2009-11-12 Thread Nicolas Williams
On Thu, Nov 12, 2009 at 11:40:23PM +, Simon Slavin wrote: > There's still some possibility for confusion, however: how many places > of decimals do you use for each currency ? As far as I know, no > currently traded currency uses more than two digits of precision.

Re: [sqlite] Output in currency format

2009-11-12 Thread Simon Slavin
On 12 Nov 2009, at 7:17pm, Peter Haworth wrote: > Just to be sure I get my calculations correct, the suggestion is that > all currency amounts should be stored in the database as whole numbers > in fields of type INTEGER. Calculations would be done using the whole > numbers and I'll need

Re: [sqlite] image upload to db trouble

2009-11-12 Thread perkinsdp
i took that part out and still nothign writes to the db Pavel Ivanov-2 wrote: > > Why should they show up in database if you're deleting it right after > inserting? > > Pavel > > On Thu, Nov 12, 2009 at 2:50 PM, perkinsdp > wrote: >> >> hey guys i have a

Re: [sqlite] image upload to db trouble

2009-11-12 Thread perkinsdp
im using a db file, I have one sqlite3 file that i use and edit with sqlite manager on firefox, the only code i have is what i posted, im sorry if im misunderstanding but im completely new at using this as of now. Keith Roberts-4 wrote: > > On Thu, 12 Nov 2009, perkinsdp wrote: > >> To:

Re: [sqlite] image upload to db trouble

2009-11-12 Thread Keith Roberts
On Thu, 12 Nov 2009, perkinsdp wrote: > To: sqlite-users@sqlite.org > From: perkinsdp > Subject: [sqlite] image upload to db trouble > > > hey guys i have a script where im taking images and uploading to an upload > file on my server ( this part works fine in my

Re: [sqlite] image upload to db trouble

2009-11-12 Thread Pavel Ivanov
Why should they show up in database if you're deleting it right after inserting? Pavel On Thu, Nov 12, 2009 at 2:50 PM, perkinsdp wrote: > > hey guys i have a script where im taking images and uploading to an upload > file on my server ( this part works fine in my

Re: [sqlite] Output in currency format

2009-11-12 Thread Fred Williams
That has always been my most effective last resort when attempting to do business math with many databases and development environments. > Thanks for all the advice on this. Just to be clear, I wasn't > referring to the accuracy of calculations when I compared the sqlite > date/time

[sqlite] image upload to db trouble

2009-11-12 Thread perkinsdp
hey guys i have a script where im taking images and uploading to an upload file on my server ( this part works fine in my code ) i also want it to put the images into my sqlite3 database which has the table images. Im new to this and cant seem to figure out why they wont show up in the db.

Re: [sqlite] Output in currency format

2009-11-12 Thread Peter Haworth
Thanks for all the advice on this. Just to be clear, I wasn't referring to the accuracy of calculations when I compared the sqlite date/time formatting capabilites to the lack of similar functionality for currency, just the fact that there is a precedent for sqlite providing output

Re: [sqlite] sqlite3 for Mac OSX 10.5

2009-11-12 Thread Peter Haworth
Thanks for all the info. I believe the problem lies within Revolution since I'm pretty sure it includes its own private library of the sqlite code. I've reported it to them and hopefully they will fix it. I understand the reasons for applications having their own copy of the code like

[sqlite] Fwd: Content filtered message notification

2009-11-12 Thread D. Richard Hipp
Begin forwarded message: > From: sqlite-users-boun...@sqlite.org > Date: November 12, 2009 1:55:07 PM EST > To: sqlite-users-ow...@sqlite.org > Subject: Content filtered message notification > > The attached message matched the sqlite-users mailing list's content > filtering rules and was

Re: [sqlite] Database is locked

2009-11-12 Thread Frank Chang
Hello, Yesterday, we recognized that we had two concurrent SQL Server threads reading and writing to the same sqlite database. Furthermore,the reader thread was not releasing it's lock. So, now we release the lock by commiting the transaction. As a result, we no longer get the SQLite

Re: [sqlite] Fwd: failing attempts at sending "Feature request: PRAGMA maximum_file_format"

2009-11-12 Thread D. Richard Hipp
On Nov 12, 2009, at 1:30 PM, D. Richard Hipp wrote: >> >> To write more future-proof code I would like to have something like >> PRAGMA default_file_format or PRAGMA maximum_file_format that lets me >> explicitly specify the highest file format version SQLite will use >> for >> new databases.

[sqlite] Fwd: failing attempts at sending "Feature request: PRAGMA maximum_file_format"

2009-11-12 Thread D. Richard Hipp
Begin forwarded message: > From: Marien Zwart > Date: November 12, 2009 1:26:11 PM EST > To: sqlite-users-ow...@sqlite.org > Subject: failing attempts at sending "Feature request: PRAGMA > maximum_file_format" > > Hi, > > I'm really sorry to bother you, but I've now

[sqlite] Disk activity on Linux

2009-11-12 Thread Bret Patterson
We're seeing a lot more disk activity than expected on Linux when using sqlite3. We've run this same series of test on windows and the disk IO is much lower, which is the opposite of what I really expected. Below is my scenario and perhaps someone can point out what I can do to fix this

Re: [sqlite] SQLite on Windows XP with ADO.Net - batching updates + inserts in a single transaction - optimal transaction size

2009-11-12 Thread Pavel Ivanov
It depends on what else you want to do with database and how important for you to be safe against power outages and OS crashes. If it's not important and you're working with database from the single process and single connection you may never commit a transaction opened at the beginning of the

Re: [sqlite] collation bug?

2009-11-12 Thread galeazzi
Sorry, I forgot to say that this method is just defined as static: static int xCompare (void* v, int iLen1, const void* str1, int iLen2, const void* str2); In my opinion the important question is: does the return value have a specific meaning according with its numeric value or returning

Re: [sqlite] collation bug?

2009-11-12 Thread Jay A. Kreibich
On Thu, Nov 12, 2009 at 05:06:20PM +0100, galea...@korg.it scratched on the wall: > int MyClass::xCompare (void* v, int iLen1, const void* str1, int > iLen2, const void* str2) > { > and I registered it: > sqlite3_create_collation(mpDB,?MYCOLLATE", SQLITE_UTF8, NULL, > MyClass::xCompare);

Re: [sqlite] ogr2ogr

2009-11-12 Thread Rich Shepard
On Thu, 12 Nov 2009, stormtrooper wrote: > There is a command line tool (ogr2ogr) that runs on linux or windows that > converts dbf to sqlite, csv, xml, etc. It is primarily a converter for > geographic data but supports tabular data as well. OGR is part of fwtools. Keith, Thank you. I'm

[sqlite] collation bug?

2009-11-12 Thread galeazzi
Hi everybody, I found a strange behaviour of SQLite (3.6.19) when it relies on a custom collation during a SELECT execution. So let me explain the matter from the beginning: I've got the following simple table: CREATE TABLE Genre ( idINTEGER NOT NULL UNIQUE, name

[sqlite] ogr2ogr

2009-11-12 Thread stormtrooper
Rich, There is a command line tool (ogr2ogr) that runs on linux or windows that converts dbf to sqlite, csv, xml, etc. It is primarily a converter for geographic data but supports tabular data as well. OGR is part of fwtools. http://fwtools.maptools.org/ http://www.gdal.org/ogr/ - supported

Re: [sqlite] Converting .dbf to SQLite

2009-11-12 Thread Alexey Pechnikov
Hello! On Thursday 12 November 2009 07:30:28 Rich Shepard wrote: >Perhaps. I learned today that only the Winduhs version of OO.o can import > .mdb files; the linux version cannot. Try to read by Linux ODBC and save to SQLite. Best regards, Alexey Pechnikov. http://pechnikov.tel/

Re: [sqlite] sqlite3_analyzer with 3.6.19 distribution

2009-11-12 Thread Dan Kennedy
On Nov 12, 2009, at 4:36 PM, Artur Reilin wrote: > I also wonder, why the analyzer isn't working. I doesn't work for me. In what respect is it malfunctioning? ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] SQLite on Windows XP with ADO.Net - batching updates + inserts in a single transaction - optimal transaction size

2009-11-12 Thread Jon
For performance reasons, I want to batch my SQLite insert/replace operations in a single SQL transaction that I send to my local SQLite database running on Windows XP. I am also using the ADO.Net assembly to interact with my SQLite database. Does anyone have any insight into how large my

Re: [sqlite] sqlite3_analyzer with 3.6.19 distribution

2009-11-12 Thread Artur Reilin
I also wonder, why the analyzer isn't working. I doesn't work for me. > > On Nov 12, 2009, at 3:01 PM, Jens Miltner wrote: > >> >> Am 11.11.2009 um 17:45 schrieb D. Richard Hipp: >> >>> >>> On Nov 11, 2009, at 11:24 AM, Jens Miltner wrote: Is sqlite3_analyzer supposed to work in 3.6.19?

Re: [sqlite] sqlite3_analyzer with 3.6.19 distribution

2009-11-12 Thread Dan Kennedy
On Nov 12, 2009, at 3:01 PM, Jens Miltner wrote: > > Am 11.11.2009 um 17:45 schrieb D. Richard Hipp: > >> >> On Nov 11, 2009, at 11:24 AM, Jens Miltner wrote: >>> >>> Is sqlite3_analyzer supposed to work in 3.6.19? >>> >> >> >> No. sqlite3_analyzer has been busted for a long time. But the

Re: [sqlite] sqlite3_analyzer with 3.6.19 distribution

2009-11-12 Thread Jens Miltner
Am 11.11.2009 um 17:45 schrieb D. Richard Hipp: > > On Nov 11, 2009, at 11:24 AM, Jens Miltner wrote: >> >> Is sqlite3_analyzer supposed to work in 3.6.19? >> > > > No. sqlite3_analyzer has been busted for a long time. But the 3.6.0 > version of sqlite3_analyzer works just fine, even on