Re: [sqlite] Starting with TCL

2017-11-16 Thread Cecil Westerhof
2017-11-17 5:38 GMT+01:00 Cecil Westerhof : > setsqliteVersion [sqlite3 -version] > ​By the way, I think it is a good idea to amend: https://sqlite.org/tclsqlite.html to show this possibility. -- Cecil Westerhof

Re: [sqlite] Starting with TCL

2017-11-16 Thread Cecil Westerhof
2017-11-16 22:20 GMT+01:00 Richard Hipp : > On 11/16/17, Cecil Westerhof wrote: > > ​Is it possible to get the library version before connecting to a > database? > > puts [sqlite -version] > ​Combining yours and Eric's version, I made: #!/usr/bin/env

Re: [sqlite] Starting with TCL

2017-11-16 Thread Eric
On Thu, 16 Nov 2017 21:28:10 +0100, Cecil Westerhof wrote: > Is it possible to get the library version before connecting to a database? > Now I do the following: > #!/usr/bin/env tclsh > > package require sqlite3 > > > sqlite3 db ~/Databases/general.sqlite > > puts

Re: [sqlite] Starting with TCL

2017-11-16 Thread Richard Hipp
On 11/16/17, Cecil Westerhof wrote: > ​Is it possible to get the library version before connecting to a database? puts [sqlite -version] -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list

Re: [sqlite] Starting with TCL

2017-11-16 Thread Cecil Westerhof
​Is it possible to get the library version before connecting to a database? Now I do the following: #!/usr/bin/env tclsh package require sqlite3 sqlite3 db ~/Databases/general.sqlite puts [db version] But I would prefer to check the version before connecting to a database. Is this possible?

Re: [sqlite] Starting with TCL

2017-11-16 Thread Cecil Westerhof
2017-11-16 18:44 GMT+01:00 Peter Da Silva : > > On 11/16/17, 11:37 AM, "sqlite-users on behalf of Cecil Westerhof" < > sqlite-users-boun...@mailinglists.sqlite.org on behalf of > cldwester...@gmail.com> wrote: > > When I use: > > db eval {SELECT * FROM

Re: [sqlite] Starting with TCL

2017-11-16 Thread Richard Hipp
On 11/16/17, Cecil Westerhof wrote: > puts $Tea, $Location Everything in TCL is a function. The syntax is "FUNCTIONNAME ARG1 ARG2 ARG3 ..." where the arguments are separated by white space. The "puts" function takes either one or two arguments. The one-argument

Re: [sqlite] Starting with TCL

2017-11-16 Thread Peter Da Silva
On 11/16/17, 11:37 AM, "sqlite-users on behalf of Cecil Westerhof" wrote: > When I use: > db eval {SELECT * FROM teaInStock} { >puts $Tea, $Location > } puts takes a single string, so you can do

[sqlite] Starting with TCL

2017-11-16 Thread Cecil Westerhof
I just wanted to start using SQLite with TCL. How can I give a formatted output? When I use: puts [db eval {SELECT * FROM teaInStock}] I get: Brandnetel {} 2017-11-16 1 Oolong {} 2017-10-29 2 Goudsbloem {} 2017-10-22 3 Jasmijn … When I use: db eval {SELECT * FROM teaInStock} { puts $Tea }

Re: [sqlite] Best way to develop a GUI front-end

2017-11-16 Thread R Smith
On 2017/11/15 11:56 PM, Simon Slavin wrote: You are locking yourself into the Windows system. By all means use this solution as a prototype but if you ever find yourself saying "I’m now doing serious programming." do what you can to escape Windows, Office, and Visual-*. Otherwise you will

[sqlite] View is not flattened when inside an IN sub-query (incl complete sql)

2017-11-16 Thread E . Pasma
Hello, below are two equivalent delete statements. The difference is that the second version uses views, actually sub-queries, on the base tables. These are simple one to one views that could be flattened out, as in http://www.sqlite.org/optoverview.html#flattening The second query plan

[sqlite] View is not flattened when inside an IN sub-query

2017-11-16 Thread E.Pasma
Hello, below are two equivalent delete statements. The difference is that the second version uses views, actually sub-queries, on the base tables. These are simple one to one views that could be flattened out, as in http://www.sqlite.org/optoverview.html#flattening The second query plan

Re: [sqlite] Best way to develop a GUI front-end

2017-11-16 Thread Balaji Ramanathan
Thank you, Peter. Perhaps it would be a good idea to update the SQLite website and point links to tcl.tk rather than tcl-lang.org. Balaji Ramanathan -- Forwarded message -- From: Peter Da Silva To: SQLite mailing list

Re: [sqlite] How not to let random be calculated again and again and

2017-11-16 Thread Cecil Westerhof
2017-11-06 11:11 GMT+01:00 Cecil Westerhof : > 2017-11-06 10:39 GMT+01:00 Keith Medcalf : > >> >> The easiest way is likely to make the query so that it cannot be >> flattened by adding an ORDER BY (that does not reference the column >> containing the

Re: [sqlite] SQLite Bytecode

2017-11-16 Thread Richard Hipp
On 11/15/17, aUser wrote: > Is it possible (and useful), to generate SQLite bytecode instead of a SQL > statement? It is neither possible nor useful. The bytecode changes from one release to the next - it is not stable. We treasure this design freedom and will not yield it. In

Re: [sqlite] SQLite Bytecode

2017-11-16 Thread Richard Hipp
On 11/15/17, aUser wrote: > Hello > > I developed an application-specific query language. Currently, I am > converting a query to a rather difficult SQL statement. > > Is it possible (and useful), to generate SQLite bytecode instead of a SQL > statement? > If yes, could someone

[sqlite] SQLite Bytecode

2017-11-16 Thread aUser
Hello I developed an application-specific query language. Currently, I am converting a query to a rather difficult SQL statement. Is it possible (and useful), to generate SQLite bytecode instead of a SQL statement? If yes, could someone share some C code as an example, how it could be done?

Re: [sqlite] Best way to develop a GUI front-end

2017-11-16 Thread Chris Locke
> For now, I am going to start > with a windows forms application in vb.net or forms in OpenOffice. I'd install SharpDevelop ( http://www.icsharpcode.net/opensource/sd/Default.aspx). Download v4.4 if you plan on using VB.Net, as the newer v5 doesn't support VB - only C#. SharpDevelop is a 15 MB