Hello, I started with Sqlite just a few days ago and gievn how simple its api is, I think I am ready to do some more complex things with it. I am primarily using it from the tcl api so far.
I have a few questions: 1) If I have a statement that includes "WHERE 0 = 1", does sqlite optimize the query and return right away or would it execute the query anyway? 2) Is there a way to get column names form a statement without (or before) executing the statement? For example, when a user enters a statement like "select * from ...". 3) I would like to test the validity of sql statements before executing them. So I thought I could use "db complete" command. But now I am not sure what "db complete" command does. In my tests, it returns 0 (false) regardless of the sql statement. In fact the only times I have gotton true is if the statement is empty. The statements are (all are valid and return data): % db complete "select 2 * 2 " % db complete "select a from tab1" % db complete "select a from tab1 where a < 10" % db complete "select a from tab1 where a < 10 order by a" __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com