Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-23 Thread Shane Harrelson
More updates for Chrome support. http://www.sqlite.org/docsrc/artifact/981f61a5e4 On Tue, Mar 23, 2010 at 11:50 PM, Shane Harrelson wrote: > I knocked out a quick TCl script that uses *exactly* the same syntax graph > specification as bubble-generator.tcl but attempts to

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-23 Thread Shane Harrelson
I knocked out a quick TCl script that uses *exactly* the same syntax graph specification as bubble-generator.tcl but attempts to render the graphs without GIFs. You can see the script here: http://www.sqlite.org/docsrc/finfo?name=art/syntax/bubble-generator-text.tcl You can view the output

[sqlite] difficulty installing sqlite3 into rubygems

2010-03-23 Thread James Richard Sheldon
I'm trying to install sqlite3 into Ruby Gems 1.9, and I get the following error: $ sudo gem1.9 install sqlite3Building native extensions. This could take a while... ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9 extconf.rb extconf.rb:2:in

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Bernie Reiter
Dear all. Sorry! Ashes on my head :-) Last night it was 3.00 in the morning before I got off my screen ... Adding single quotes AND actually using sqlite did it (see below). Txs again for all your help and patience. bernie sqlite> select strftime('%w','2010-03-21'); 0 sqlite> select

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread P Kishor
On Tue, Mar 23, 2010 at 2:58 PM, Bernie Reiter wrote: > Nico, thanks for your quick reply. > > I have copied the function strftime('%Y-%m-%d', ...) directly the sqlite > documentation > and substituted the ... with my date string. > Unfortunately, your

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Igmar Palsenberg
On 3/23/10 8:58 PM, Bernie Reiter wrote: > Nico, thanks for your quick reply. > > I have copied the function strftime('%Y-%m-%d', ...) directly the sqlite > documentation > and substituted the ... with my date string. > Unfortunately, your advice doesn't seem to convince my Linux box, > neither

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Bernie Reiter
Nico, thanks for your quick reply. I have copied the function strftime('%Y-%m-%d', ...) directly the sqlite documentation and substituted the ... with my date string. Unfortunately, your advice doesn't seem to convince my Linux box, neither with a straight single quote nor with a "backwards

Re: [sqlite] Question about binding

2010-03-23 Thread Vance E. Neff
Thanks to all those who responded! It was quite educational. I'm using the zentus java jdbc wrapper. It seems to only support an index # for the binding index so I'm stuck with being careful as to how I count ?s. Is there documentation that talks about about the various binding place holders

Re: [sqlite] SQlite C API screwing port access?

2010-03-23 Thread Simon Slavin
On 23 Mar 2010, at 7:29pm, Martin Sigwald wrote: > DB_NAME equals "servers.db". > Both close and open return 0, my code catches a possible error, I didnt > included for legibility. > I tired using ":memory:", same result: cant ping. > These is quite frustrating. Hmm. Thanks for trying. If

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Jay A. Kreibich
On Tue, Mar 23, 2010 at 07:25:56PM +, Bernie Reiter scratched on the wall: > Sunday, March 21st 2010:SELECT strftime('%w',2010-03-21); => 6 > Monday, March 22nd 2010: SELECT strftime('%w',2010-03-22); => 5 > Tuesday, March 23nd 2010: SELECT strftime('%w',2010-03-23); => 4 Try

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Stephan Wehner
On Tue, Mar 23, 2010 at 12:25 PM, Bernie Reiter wrote: > Dear Dr. Hipp, > SELECT strftime('%w',2010-03-22 22:12:40) ; => SQL error near "22": syntax > error Add quotes: SELECT strftime('%w','2010-03-22 22:12:40'); See the section Examples at

Re: [sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Nicolas Williams
On Tue, Mar 23, 2010 at 07:25:56PM +, Bernie Reiter wrote: > I am checking this for Sunday, March 21st 2010, Monday, 22nd March 2010 and > Tuesday, 23nd March 2010: > > Sunday, March 21st 2010:SELECT strftime('%w',2010-03-21); => 6 You need single quotes around the date value.

Re: [sqlite] SQlite C API screwing port access?

2010-03-23 Thread Martin Sigwald
DB_NAME equals "servers.db". Both close and open return 0, my code catches a possible error, I didnt included for legibility. I tired using ":memory:", same result: cant ping. These is quite frustrating. On Tue, Mar 23, 2010 at 4:23 PM, Simon Slavin wrote: > > On 23 Mar

[sqlite] Computing day of week the using strftime() function - Feature or bug ?

2010-03-23 Thread Bernie Reiter
Dear Dr. Hipp, SQLite is a wonderful tool. Thanks a LOT ! I am working every day with it and love it more and more :-) Only sometimes I am confused. Maybe the community can help or enlighten me. Thanks again bernie 1) My environment: -- [liveu...@localhost ~]$ date Mon Mar 22

Re: [sqlite] SQlite C API screwing port access?

2010-03-23 Thread Simon Slavin
On 23 Mar 2010, at 7:06pm, Martin Sigwald wrote: > Here is the actual code: > > int main(void) > { >sqlite3* db_handle; > > sqlite3_open(DB_NAME,_handle); > sqlite3_close(db_handle); > my_ping("10.0.0.4"); > > return 0; > } > > If I call close after ping, it works.

Re: [sqlite] SQlite C API screwing port access?

2010-03-23 Thread Martin Sigwald
Here is the actual code: int main(void) { sqlite3* db_handle; sqlite3_open(DB_NAME,_handle); sqlite3_close(db_handle); my_ping("10.0.0.4"); return 0; } If I call close after ping, it works. However, if besides of opening the DB I perform any query, ping doesnt work

Re: [sqlite] fast acces to one memory located table from two threads

2010-03-23 Thread Jakub Ladman
Dne úterý 23 března 2010 19:22:35 Pavel Ivanov napsal(a): > I'd suggest you to use any kind of memory structure (like deque or :-) I do not know what is deque. > whatever you prefer) for transferring data from one thread to another. > Besides anything else it will be faster than using SQLite for

Re: [sqlite] fast acces to one memory located table from two threads

2010-03-23 Thread Teg
Yeah, I do this all the time with STL and a critical section lock. A list, or set and a lock is all you need. list of vectors for instance. Set if you want it to automatically reject duplicated, a list for just dumping data to it. C Tuesday, March 23, 2010, 2:22:35 PM, you wrote: PI> I'd

Re: [sqlite] SQlite C API screwing port access?

2010-03-23 Thread Matthew L. Creech
On Tue, Mar 23, 2010 at 12:55 PM, Martin Sigwald wrote: > I have a program which builds an ICMP package over IP and sends it. Before > that, I get IP number and other information from a SQlite DB. I was having > problems, so I began to comment different parts of the code,

Re: [sqlite] SQlite C API screwing port access?

2010-03-23 Thread Pavel Ivanov
> Pavel: Yes, I allocate memory inside the ping function, but that is done > after calling de sqlite functions. There are no pointers shared between the > sqlite functions and the ping part. Actually I meant pointers shared between ping part and the part before calls to sqlite functions. Did you

Re: [sqlite] fast acces to one memory located table from two threads

2010-03-23 Thread Pavel Ivanov
I'd suggest you to use any kind of memory structure (like deque or whatever you prefer) for transferring data from one thread to another. Besides anything else it will be faster than using SQLite for this particular task. As you have already understood there's no way you can make 2 connections to

Re: [sqlite] SQlite C API screwing port access?

2010-03-23 Thread Martin Sigwald
I already tried that, and the first ping works while the second one doesn't, which validates my "screwing ports theory". Simon: Tried changing the DB_NAME and it didnt work either. Pavlov: Yes, I allocate memory inside the ping function, but that is done after calling de sqlite functions. There

Re: [sqlite] SQlite C API screwing port access?

2010-03-23 Thread Teg
Hello Martin, Do the ping both before and after you open the DB. ping_server("10.0.0.4"); //my ping function, which pings a "hardcoded" IP, sqlite3_open(DB_NAME); sqlite3_close(DB_NAME); ping_server("10.0.0.4"); //my ping function, which pings a "hardcoded" IP, See if the first one works.

[sqlite] fast acces to one memory located table from two threads

2010-03-23 Thread Jakub Ladman
Hello to all I am back here to mailing list after about two years and also back to programming with sqlite in general. I have new task and i do not know how to do it. I need an application consisting two threads. In one of them i need to store incomming "messages" (one message is 1 to 8

Re: [sqlite] SQlite C API screwing port access?

2010-03-23 Thread Simon Slavin
On 23 Mar 2010, at 4:55pm, Martin Sigwald wrote: > sqlite3_open(DB_NAME); > sqlite3_close(DB_NAME); > > ping_server("10.0.0.4"); //my ping function, which pings a "hardcoded" IP, > doesnt interact with DB > > > If I run that code, the package nevers gets send (can't detect it with >

Re: [sqlite] SQlite C API screwing port access?

2010-03-23 Thread Pavel Ivanov
Does your pinging code involves some pointers to memory (strings or any other stuff) that could be already released before SQLite code is called? Try to run your program under valgrind and see whether it gives any errors. Pavel On Tue, Mar 23, 2010 at 12:55 PM, Martin Sigwald

[sqlite] SQlite C API screwing port access?

2010-03-23 Thread Martin Sigwald
I have a program which builds an ICMP package over IP and sends it. Before that, I get IP number and other information from a SQlite DB. I was having problems, so I began to comment different parts of the code, until I got to this code (pseudocode): sqlite3_open(DB_NAME); sqlite3_close(DB_NAME);

[sqlite] Usage of SQLITE_OMIT_DISKIO and SQLITE_OMIT_MEMORYDB

2010-03-23 Thread ramesh.kotabagi
Hi, SQLITE_OMIT_DISKIO : This option omits all support for writing to the disk and forces databases to exist in memory only. SQLITE_OMIT_MEMORYDB: When this is defined, the library does not respect the special database name ":memory:" (normally used to create an in-memory database). If

Re: [sqlite] Reading the VDBE program

2010-03-23 Thread Navaneeth Sen B
Hello all, So what you guys suggest is to stop studying the SQLite internals, jump to the programming area and get to my aim. Thankyou all for your suggestions :-) Regards, *Navaneeth Sen B.* On 3/23/2010 6:46 PM, Pavel Ivanov wrote: >> The best way to make a wrapper round SQLite is to use

Re: [sqlite] Reading the VDBE program

2010-03-23 Thread Pavel Ivanov
> The best way to make a wrapper round SQLite is to use its > API, which is generally thought of as "programming using SQLite". I agree with that. And to make a good wrapper without changing SQLite itself you don't need to know the most part of SQLite's internals, especially you don't ever need

Re: [sqlite] suggestion - make pragma case_sensitive_like queryable

2010-03-23 Thread Bogdan Ureche
> > > The setting is detectable: > > Simon, thank you for the reply. It's not exactly the answer I was hoping for, but I suppose fixing this is a low priority if there is a workaround. Regards, Bogdan ___ sqlite-users mailing list

Re: [sqlite] Reading the VDBE program

2010-03-23 Thread Hamish Allan
On Tue, Mar 23, 2010 at 1:02 PM, Navaneeth Sen B wrote: > My ultimate aim is not to program using SQLite. > I just want to know the internals of it? How it works? > How i can make a new wrapper around it so that my exsisting applications > can use it without huge

Re: [sqlite] Reading the VDBE program

2010-03-23 Thread Navaneeth Sen B
Hi Pavel, You are right it contains sqlite3.c and sqlite3.h. "if you run Linux then I believe SQLite can be compiled and work right away without any additional platform-specific tuning and learning of internal magic. ;-)" My ultimate aim is not to program using SQLite. I just want to know the

Re: [sqlite] Reading the VDBE program

2010-03-23 Thread Pavel Ivanov
>     The first one does not include any source files. Are you sure about that? First archive should contain one source file - sqlite3.c which is enough to compile SQLite at least in standard configuration. And btw, if you run Linux then I believe SQLite can be compiled and work right away

Re: [sqlite] Reading the VDBE program

2010-03-23 Thread Navaneeth Sen B
No, I was just trying to study how the whole magic happens when you do the steps. My ultimate aim is to port this to a mips platform running linux on it. I donno whether it will be helpful for my purpose. Another doubt is that i have downloaded two tar balls from the site. 1.

Re: [sqlite] Reading the VDBE program

2010-03-23 Thread Pavel Ivanov
Just out of curiosity: what are you need it for? Do you think that it's necessary to use SQLite properly? Pavel On Tue, Mar 23, 2010 at 8:01 AM, Navaneeth Sen B wrote: > Hello all, > > I am new to SQLite software. I have understood the structure of SQLite > as

[sqlite] Reading the VDBE program

2010-03-23 Thread Navaneeth Sen B
Hello all, I am new to SQLite software. I have understood the structure of SQLite as described in the "Architecture of SQLite" manual. I am now reading the document named "The Virtual Database Engine of SQLite" which I got from the SQLite site. Currently i am working on Fedora 11 machine with

Re: [sqlite] Porting Sqlite to MQX OS: Question 3

2010-03-23 Thread Pavel Ivanov
If task 1 will have only one connection to customer.db and task 2 will have only one connection to fault.db then it looks like you don't need any locking indeed. And most part of mutexes is not necessary too, although probably you'll need ones that protect some global variables (can't say how many

Re: [sqlite] INSERT failing.

2010-03-23 Thread Paul Corke
> unrecognized token: ""Man weiss es nicht, aber es war ein Feiertag.")" The character after the . is not a double-quote, plus you should be using single quotes anyway. Paul. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] suggestion - make pragma case_sensitive_like queryable

2010-03-23 Thread Simon Davies
On 22 March 2010 21:53, Bogdan Ureche wrote: > The pragma case_sensitive_like is not queryable, unlike other pragmas. Is > there any reason why it's not? > > If not, I would like to suggest to be made queryable, for consistency. > > Bogdan The setting is detectable: sqlite>