Re: [sqlite] Tcl syntax help

2011-12-07 Thread Arjen Markus
Hi Shamil, yes, John's is more concise and better still, it works: my use of [list insert ...] caused the last element to be delimited by {} as it contains spaces. Regards, Arjen On 2011-12-08 05:06, Shamil F. Daghestani wrote: Thanks. It works even with my original list: set roads [list {Mil

Re: [sqlite] Tcl syntax help

2011-12-07 Thread Shamil F. Daghestani
Thanks. It works even with my original list: set roads [list {Miller lane} {Pine street} {Wilson blvd}] /sd -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of John Gillespie Sent: Wednesday, December 07, 2011 5:22 PM To: Genera

Re: [sqlite] Tcl syntax help

2011-12-07 Thread John Gillespie
Try set roads {"Miller lane" "Pine street" "Wilson blvd"} set SQL "insert into myTable VALUES( '[join $road "','"]' )" db eval $SQL # note the single quotes on each side of the join command # and the argument to the join command. JG ___ sqlite-users mai

Re: [sqlite] Tcl syntax help

2011-12-07 Thread Shamil F. Daghestani
Thanks for your response, Arjen. I tried: ## set roads [list {Miller lane} {Pine street} {Wilson blvd}] package require sqlite sqlite db [file join c:/test.sql] set sqlRoads {} foreach road $roads { lappend sqlRoads "'$road'" } db eval [list insert into myTable VALUES([join $sqlRoads

Re: [sqlite] Building Windows applications

2011-12-07 Thread Black, Michael (IS)
Do like a lot of us do and forget the DLL and just put sqlite3.c/h into your project. Then you can build and forget about it and it will always work in your project (barring any future 32/64 incompatibilities). And you don't have to worry about who's testing what bitset as it's completely sel

[sqlite] Building Windows applications

2011-12-07 Thread Peter Zoll
On a Windows 7 64 bit desktop machine we downloaded the 64-bit SQlite dll. As can be seen at http://www.imagsts.com/BeisaTechnical.html we had to change a parameter in Visual Studio 2010 for the application to run inside Visual Studio (typical debugging mode). All seemed well until we went to buil

Re: [sqlite] Cache design using sqlite3...

2011-12-07 Thread Mohit Sindhwani
On 7/12/2011 6:33 AM, Simon Slavin wrote: Right. One way to do it is to have a table in the database used to point to the next database. Normally that table has zero rows in it. You can check it with SELECT COUNT(*) FROM databaseObsolete when an entry does appear in it the count switches t

Re: [sqlite] Unexplained minor regression (bug) 3.7.8 up

2011-12-07 Thread Richard Hipp
On Wed, Dec 7, 2011 at 2:48 AM, Max Vlasov wrote: > > btw, could not find exact steps for getting trunk amalgamation. > Is it : > - get > http://www.sqlite.org/src/tarball/sqlite-latest-trunk.tar.gz?uuid=trunk > - extract on a unix-compatible machine > - ./configure > - make sqlite3.c > You buil

[sqlite] [ANN] ODB C++ ORM 1.7.0 adds support for optimistic concurrency

2011-12-07 Thread Boris Kolpackov
Hi, I am pleased to announce the release of ODB 1.7.0. ODB is an open-source object-relational mapping (ORM) system for C++. It allows you to persist C++ objects to a relational database without having to deal with tables, columns, or SQL and without manually writing any of the mapping code. Maj

Re: [sqlite] Tcl syntax help

2011-12-07 Thread Arjen Markus
Hi Shamil, I am not an expert in SQL, but how about: set sqlRoads {} foreach road $roads { lappend sqlRoads "'$road'" } db eval [list insert into myTable VALUES([join $sqlRoads ,])] That way, the values are properly formatted, delimited by single quotes and separated by commas. Regards, Ar