[sqlite] sqlite on mac os x 64 bits

2010-05-18 Thread Sylvain Pointeau
hello, I am generally doing: ./configure make sudo make install for having sqlite in my /usr/local/ directory. but is it 64 bits? or do I have to add a special option? Best regards, Sylvain ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-18 Thread Gilles Ganault
On Mon, 17 May 2010 20:31:07 +0200, Henk Pretorius preto...@gmail.com wrote: Try SQLite Manager - a FireFox add on, but can also run stand-alone as a XUL application. Thanks, I'll see if it can show data entry forms so non-technies can handle their database safely.

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-18 Thread Gilles Ganault
On Mon, 17 May 2010 22:55:47 -0700, Matt Young youngsan...@gmail.com wrote: I have that problem. A solution is an ultra lite SQLite window to play along side existing spread sheet packages. Then just get read and write to the spreadsheet happening. Right. There a millions of users who have

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-18 Thread Bart Smissaert
You can run SQL on sheet ranges. Just need to make sure that the workbook is saved and closed as there is a bug to do with ADO causing a memory leak. RBS On Tue, May 18, 2010 at 11:19 AM, Gilles Ganault gilles.gana...@free.fr wrote: On Mon, 17 May 2010 22:55:47 -0700, Matt Young

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-18 Thread Gilles Ganault
On Tue, 18 May 2010 11:48:06 +0100, Bart Smissaert bart.smissa...@gmail.com wrote: You can run SQL on sheet ranges. Just need to make sure that the workbook is saved and closed as there is a bug to do with ADO causing a memory leak. Thanks for the tip. I'll investigate in-place querying in Excel

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Black, Michael (IS)
I think I see a potential problem with your logic. You say up to 2 seconds and up to 4 times. So it sounds like you're doing a 500ms sleep on your retry with 4 tries? What you could easiliy hit is the probability that on each time you ask for a lock it could be busy doing the inserts you

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-18 Thread Bart Smissaert
how to read Excel/OO files and somehow put them into an SQLite database for better use. Quite simple that. Basically: range variant array loop through array and write to SQLite. Let me know and I will post some example code. RBS On Tue, May 18, 2010 at 11:56 AM, Gilles Ganault

[sqlite] Accessing SQLite from PHP5?

2010-05-18 Thread Gilles Ganault
Hello I'd like to use SQLite from some PHP5 scripts, either on Linux or Linux. What is the right way to set things up so that I can use a recent release of SQLite (apparently, the SQLite that comes with PHP by default is a 2.x release)? Thank you.

Re: [sqlite] sqlite on mac os x 64 bits

2010-05-18 Thread Doug Currie
On May 18, 2010, at 4:14 AM, Sylvain Pointeau wrote: but is it 64 bits? or do I have to add a special option? Last time I built a Universal Binary sqlite3 on OS X (March 2010 3.6.22) I had to CFLAGS='-arch i686 -arch x86_64' LDFLAGS='-arch i686 -arch x86_64' ./configure

Re: [sqlite] Accessing SQLite from PHP5?

2010-05-18 Thread Swithun Crowe
Hello GG I'd like to use SQLite from some PHP5 scripts, either on Linux or GG Linux. A wise choice either way! GG What is the right way to set things up so that I can use a recent GG release of SQLite (apparently, the SQLite that comes with PHP by GG default is a 2.x release)? If you use

Re: [sqlite] Accessing SQLite from PHP5?

2010-05-18 Thread Gilles Ganault
On Tue, 18 May 2010 14:30:06 +0100 (BST), Swithun Crowe swit...@swithun.servebeer.com wrote: If you use PDO, then you get access to Sqlite 3.x databases: http://www.php.net/manual/en/ref.pdo-sqlite.php Thanks for the input. After following the following article, I successfully installed Lighttpd

Re: [sqlite] Accessing SQLite from PHP5?

2010-05-18 Thread Michal Seliga
I think this is not really sqlite related, i am using fastcgi with nginx server and when security became in issue i had similar problems quick solution - do 'chmod -R 777 /srv/www' and you will see if problem is related to rights or if its something else also i think you should use absolute

Re: [sqlite] sqlite on mac os x 64 bits

2010-05-18 Thread Sylvain Pointeau
Hello, many thanks for your answer, I tried the command file on the current lib that I just built (by ./configure CFLAGS=-DSQLITE_ENABLE_ICU `icu-config --cppflags` LDFLAGS=`icu-config --ldflags`) it gives: $ file /usr/local/lib/libsqlite3.dylib /usr/local/lib/libsqlite3.dylib: Mach-O 64-bit

Re: [sqlite] Accessing SQLite from PHP5?

2010-05-18 Thread Swithun Crowe
Hello GG Could it be that the Www directory is off-limit to PHP scripts in GG write mode? FWIW, PDO can succesfully find and open db.sqlite: The directory itself should be writeable by the lighttpd user, as sqlite will want to create temporary journal files in the same directory. So being

Re: [sqlite] Accessing SQLite from PHP5?

2010-05-18 Thread Gilles Ganault
On Tue, 18 May 2010 15:57:37 +0200, Michal Seliga michal.sel...@visicom.sk wrote: I think this is not really sqlite related, i am using fastcgi with nginx server and when security became in issue i had similar problems quick solution - do 'chmod -R 777 /srv/www' and you will see if problem is

Re: [sqlite] Accessing SQLite from PHP5?

2010-05-18 Thread Gilles Ganault
On Tue, 18 May 2010 15:04:35 +0100 (BST), Swithun Crowe swit...@swithun.servebeer.com wrote: You don't get the exception message because the exec method doesn't throw an exception. It puzzled me for a bit. Right, it doesn't raise an exception :-/ I had to look at /var/log/lighttpd/error.log.

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-18 Thread Gilles Ganault
On Tue, 18 May 2010 13:18:49 +0100, Bart Smissaert bart.smissa...@gmail.com wrote: Quite simple that. Basically: range variant array loop through array and write to SQLite. Let me know and I will post some example code. If you have some basic code to go through Excel or OO sheets to gather data

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Sam Carleton
On Tue, May 18, 2010 at 7:35 AM, Black, Michael (IS) michael.bla...@ngc.com wrote: I think I see a potential problem with your logic. You say up to 2 seconds and up to 4 times. So it sounds like you're doing a 500ms sleep on your retry with 4 tries? Actually no, not just 4 retries. What

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Black, Michael (IS)
Interesting...but that logic means that later processes might get their results before earlier ones. Imagine this: process #1 hits BUSY -- sleep 9,10,11,12,13,14,15 Shortly after the sleep 15 process#2 comes in process #2 hits BUSY -- sleep 9 -- gets lock - returns (note process#1 is still

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Pavel Ivanov
You'll get fairer resolution of busy contention with a fixed timeout.  Just do 10ms 50 times.  That way the first guy in should get the first results. Don't fool yourself. There's no value of timeout that will guarantee fairness. Just consider this scenario: process #1 - BUSY, sleep 10

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Jay A. Kreibich
On Tue, May 18, 2010 at 10:19:32AM -0500, Black, Michael (IS) scratched on the wall: Interesting...but that logic means that later processes might get their results before earlier ones. Yes, but that's true regardless. We're talking about parallel operation on what may or may not be MP/MC

Re: [sqlite] [Windows] Application to let end-users handle records?

2010-05-18 Thread Bart Smissaert
This is a VB6 procedure (in an ActiveX dll) that handles this. Obviously there are a lot of secondary routines that you don't have, but I think you will get the general idea of what is going on here. Public Sub vArray2SQLiteTable(strDB As String, _ vArray As Variant,

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Simon Slavin
On 18 May 2010, at 4:19pm, Black, Michael (IS) wrote: Interesting...but that logic means that later processes might get their results before earlier ones. There is no harm in this. In fact it's a characteristic of parallel systems. If it truly mattered which order the results arrived in,

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Black, Michael (IS)
Actually I wonder if the sqlite3 mutex calls would be better yet. They would appear to guarantee synchronization and you could just allow them to block when BUSY or use the try function if you want to timeout. http://www.sqlite.org/c3ref/mutex_alloc.html If they do what I think they would

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Pavel Ivanov
Actually I wonder if  the sqlite3 mutex calls would be better yet. http://www.sqlite.org/c3ref/mutex_alloc.html They work only inside one process. They won't provide inter-process locks. If they do what I think they would guarantee FIFO and fastest possible response to the users. I don't

[sqlite] issue with sqlite + user function + load dll implemented with Qt

2010-05-18 Thread Sylvain Pointeau
hello, I am facing a very bizarre issue. I am on mac os x 64 bits. I needed a uuid() function that generates GUID. I created then a dll with Qt like: #include /usr/local/include/sqlite3ext.h SQLITE_EXTENSION_INIT1 #include QtCore/QUuid #include string.h extern C void

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Black, Michael (IS)
Rats on the interprocess locks. I was still talking about sleeping for spinning the BUSY return -- but just doing it as fast as possible without using much CPU instead of picking 10ms which seeem too long to me when the transactions should take sub-millisecond times. Michael D. Black

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Pavel Ivanov
I was still talking about sleeping for spinning the BUSY return -- but just doing it as fast as possible without using much CPU instead of picking 10ms which seeem too long to me when the transactions should take sub-millisecond times. What do you mean by this? I don't understand you.

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Jay A. Kreibich
On Tue, May 18, 2010 at 12:50:20PM -0500, Black, Michael (IS) scratched on the wall: Rats on the interprocess locks. More to the point, database connection mutexes are just for the database connection. Even the same process with more than one database connection might fight with each

Re: [sqlite] read only databases and in-memory databases

2010-05-18 Thread Black, Michael (IS)
Proof is in the pudding... Try this program: It's got two forks going. Does 5000 inserts and 5000 selects simultaneously. (it's not pretty but it works). It shows how many BUSY times occur for both sections. Run it without any args and it won't sleep at all. There are four sleep values of

Re: [sqlite] [csv extension] Error while reading long lines

2010-05-18 Thread gwenn
Here is some tests: --- csv1.test +++ csv1.test @@ -23,10 +23,11 @@ # # csv-1.*: Creating/destroying csv tables. # csv-2.*: Linear scans of csv data. # csv-3.*: Test renaming an csv table. # csv-4.*: CREATE errors +# csv-5.*: Dirty header, long line, escaped quotes, escaped

Re: [sqlite] issue with sqlite + user function + load dll implemented with Qt

2010-05-18 Thread Sylvain Pointeau
a little more details on how I use the extension with sqlite3: In my shell script, I am running sqlite3 on all files of a folder: find ./scripts -iname *.sql | while read sqlfile do echo -- ${sqlfile} /usr/local/bin/sqlite3 mydb.db3 $sqlfile; done and in my sql script, I am loading the dll