Re: [sqlite] resource temporarily unavailable after sqlite3_open()

2009-08-11 Thread Mark Richards
D. Richard Hipp , On 8/11/2009 16:39: > program is using LinuxThreads or NPTL for its threading. (SQLite has > to know which is used because there are serious bugs in LinuxThreads > that SQLite has to work around.) So pthreads gets used once, by > SQLite, even if you don't do any threading in

Re: [sqlite] resource temporarily unavailable after sqlite3_open()

2009-08-11 Thread Mark Richards
D. Richard Hipp , On 8/11/2009 16:02: > > Perhaps pthreads is going goofy. Please recompile with - > DSQLITE_THREADSAFE=0 and see if that helps. > BINGO. env CC="gcc-cris -mlinux -isystem $EROOT/include"CPP="gcc-cris -mlinux -E -isystem $EROOT/include" CXX="g++-cris -mlinux -xc++

Re: [sqlite] resource temporarily unavailable after sqlite3_open()

2009-08-11 Thread Mark Richards
L error: %s\n", zErrMsg); sqlite3_free(zErrMsg); } sqlite3_close(db); (Note: WriteSyslogMessage() issued a system("logger 'string'"); call) Same issue. -1 returned during read(). /m D. Richard Hipp , On 8/11/2009 15:38: > On Aug 11, 2009, at 2:53 PM, Mark Richar

Re: [sqlite] resource temporarily unavailable after sqlite3_open()

2009-08-11 Thread Mark Richards
I also (just) tried 3.6.17. Same issue. /m Mark Richards , On 8/11/2009 14:53: > Environment: > Linux axis 2.6.19 #9 PREEMPT Mon Apr 6 15:44:03 EDT 2009 cris unknown > > Sqlite: > Sqlite: sqlite-3.6.14 > ./configure --host=cris-axis-linux-gnu >--prefix

[sqlite] resource temporarily unavailable after sqlite3_open()

2009-08-11 Thread Mark Richards
Environment: Linux axis 2.6.19 #9 PREEMPT Mon Apr 6 15:44:03 EDT 2009 cris unknown Sqlite: Sqlite: sqlite-3.6.14 ./configure --host=cris-axis-linux-gnu --prefix=/AEMDEV/83+/devboard-R2_10/target/cris-axis-linux-gnu --enable-static=yes --enable-shared=yes

Re: [sqlite] SQLite.org needs online forms

2007-08-03 Thread Mark Richards
john s wolter wrote: SQLite.org in my opinion, needs to have online community forms. I first used majordomo ten years ago which is like the list manager being used for sqlite-users@sqlite.org but in today's Internet it can be mistaken for SPAM. I do not know if SQLite would qualify because of

Re: [sqlite] how do i generate a uniqueidentifier ?

2007-07-27 Thread Mark Richards
Chase wrote: how do i generate a uniqueidentifier ? Define a column as follows: {fieldname} INTEGER NOT NULL PRIMARY KEY eg: CREATE TABLE hardware_types (record_key INTEGER NOT NULL PRIMARY KEY,hardware_key INTEGER default 0);

Re: [sqlite] Re: create or update question

2007-04-03 Thread Mark Richards
Eric S. Johansson wrote: if the insert fails (i.e. record exists), it triggers an exception which I use to trigger an update. I get many more updates than inserts of course but I haven't figured out how to trigger an exception on update if the record doesn't exist. From the FWIW dept,

Re: [sqlite] migrating from mysql

2007-02-18 Thread Mark Richards
Frederick Grim wrote: Howdy all, So I am wondering if anyone has run into this problem. I am trying to move from mysql to sqlite and the unique constraint from primary keys is not allowing me to insert my sql that I dumped from the mysql database. I have a bunch of join tables so I

Re: [sqlite] Emergency Bail Out

2007-02-09 Thread Mark Richards
Rich Shepard wrote: Yesterday I trapped myself in sqlite3 and could not exit the application. I was running the SQLite shell in a virtual console and inadvertently entered ',e' instead of '.e' to exit. Cue the theme from 'Jaws.' I was trapped and could not escape. Not, that is, until I went

Re: [sqlite] Abuse of the SQLite website

2007-01-30 Thread Mark Richards
[EMAIL PROTECTED] wrote: Thoughts anyone? Are there less drastic measures that might be taken to prevent this kind of abuse? Headers can always be forged as to browser and OS. Attackers will eventually figure it out and then you're back to the drawing board again. As tempting as this

Re: [sqlite] Retrieve Table Structure

2007-01-20 Thread Mark Richards
[EMAIL PROTECTED] wrote: What is the easiest way to retrieve the structure of a table? The only thing i have found so far is by parsing the `sqlite_master`.`sql` which seems to be too much coding. I want them as (char** column_names), (char **column_types) or something similar. thanks in advance

Re: [sqlite] database image malformed

2007-01-10 Thread Mark Richards
Dan Kennedy wrote: On Tue, 2007-01-09 at 22:28 -0500, Mark Richards wrote: Using sqlite in our embedded device has offered tremendous capabilities and very conveniently, and I thank the developers and enthusiasts who continue to further this excellent project. I've had one issue that I

[sqlite] database image malformed

2007-01-09 Thread Mark Richards
ause of this type of issue? 2) does anyone know what did SQLite Administrator do that VACUUM didn't? 3) since auto_vacuum is ON, I still need to do a VACUUM every so often. Any ideas why? /mark richards - To unsubsc

Re: [sqlite] Why is VACUUM so slow?

2006-11-18 Thread Mark Richards
s saved the horrors of losing the database entirely which, on the embedded platform that it runs upon, could not be recovered in situ due to memory constraints. In the end, switching to sqlite3 and using the auto vacuum pragma has resolved the problem. /mark richards -- "I'm convinced t

Re: [sqlite] Can anyone recommend some ISAM db to me?

2006-10-08 Thread Mark Richards
By "the parsing" do you mean to say it is difficult to read the result of a query? Yes, I think that can become quite complicated. But there are some good recipes for doing this, including the simple one in the documentation. You can do a lot with simple SQL statements. Before throwing SQLite

Re: [sqlite] SQLite under linux

2006-09-26 Thread Mark Richards
To use the library, either in shared or static mode, you must first build it successfully and then install it, Please tell us your build procedure and any errors you got. /m Lloyd wrote: then I tried to "make" the file, but it failed, any how I got the necessary sqlite3.h file. But still

Re: [sqlite] Re: Query returns all rows

2006-09-25 Thread Mark Richards
Hmm.. I'm so used to doing this via php's sqlite interface: SELECT * FROM blah WHERE id = "12345"; "form" in double quotes is an alternative way to refer to FORM column - it is _not_ a string literal. So your query condition is WHERE FORM=FORM, which is of course always true (except

Re: [sqlite] Query returns all rows

2006-09-25 Thread Mark Richards
I would tend to avoid mixed case and never use all upper case to specify anything (other than when defining a constant perhaps). Your use of case between "FORM" and "Form" as example. Also the use of the term "Type" for a fieldname (or variable) may be stretching reserved words a bit. For

Re: [sqlite] Re: Re: sqlite3_get_table and non-strings

2006-09-22 Thread Mark Richards
>>I can't help but notice that verb field is declared as TEXT(80) in the >>database, but char[16] in your structure. I couldn't help notice that you noticed. :) >>If you mean an instance of a structure, then of course you can >> allocate one on the heap. Yes, that's what I meant to say. Thanks

Re: [sqlite] Re: sqlite3_get_table and non-strings

2006-09-22 Thread Mark Richards
> Do you expect sqlite3_get_table to look at char*** pointer and somehow > guess that it's a structure, and figure out types of individual > fields? How would you go about implementing something like that? Ha! Good question. I suppose this has already been broached when the design of

[sqlite] sqlite3_get_table and non-strings

2006-09-22 Thread Mark Richards
Although it does not appear to be mentioned in the documentation, is it correct to assume that sqlite3_get_table can only handle string datatypes? In a particular problem I am working a query is made to return an integer and three string fields. The issue may have more to do with the wrapper

Re: [sqlite] legacy_file_format

2006-09-16 Thread Mark Richards
That's the problem! Thank you for pointing it out. /m [EMAIL PROTECTED] wrote: Version 3.3.7 creates (by default) a database file that can be read or written by any version of SQLite back to version 3.0.0. There is no need to do the "PRAGMA legacy_file_format=ON". That is now the default.

[sqlite] legacy_file_format

2006-09-14 Thread Mark Richards
With sqlite version 3.3.7 if I create a new database using: if (sqlite3_open("/var/tmp/solarwave/aem.db", )!=0) { printf("Cannot open db\n"); return(false); } and then issue the following: snprintf(query, QUERY_SIZE, "%s", "PRAGMA legacy_file_format = ON");

Re: [sqlite] A lillte help adding sqlite to a c program

2006-09-09 Thread Mark Richards
I don't know how to work string types in c++, but it looks like you need to initialize an integer t=0, or replace sql[t] with sql[0] perhaps? /m Lloyd Thomas wrote: Jay, Thanks for your reply. I gave it a try with and got a few errors. as follows

Re: [sqlite] A lillte help adding sqlite to a c program

2006-09-09 Thread Mark Richards
Maybe. Here's what I do (in c). DoSql() is a wrapper function. I've included a callback function (and associated structure) below it. The call is made thusly: static char cData[1024]; char query[255]; snprintf(query, QUERY_SIZE, "SELECT * FROM inikeys WHERE inisection = \"%s\" AND

Re: [sqlite] Error handling.

2006-08-26 Thread Mark Richards
Looks like you're not alone... http://www.gatago.com/comp/databases/20027474.html /m - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] concurrency version 2.8.17

2006-08-23 Thread Mark Richards
That's the ticket.. and it looks like sqlite_busy_timeout() may be my answer. Many thanks! /m [EMAIL PROTECTED] wrote: Look in the www directory. There are TCL script which output HTML that goes (or went) onto the website. -- D. Richard Hipp <[EMAIL PROTECTED]>