Re: [sqlite] philosophy behind public domain?

2005-05-26 Thread Greg Miller
Chad Whitacre wrote: I am interested in the reasoning behind SQLite's dedication to the public domain vis-a-vis other copyright/licensing options (GPL, BSD, etc.) Is there any documentation available on this decision? It comes down to goals. If your goal is to give other people code to use, t

[sqlite] Newbie API questions

2005-05-26 Thread Clark Christensen
OK, I'm not a C programmer (maybe I'll get there eventually). But I am writing a wrapper for WinBatch, and I have a couple of questions about SQLite3's datatypes (using 3.2.1 on Windows) [1] I see in the API reference for sqlite3_open() and sqlite3_prepare() what looks like a "sqlite3" datatype.

Re: [sqlite] how to list table making a view

2005-05-26 Thread Lawrence Chitty
Noel Frankinet wrote: Hello, Is there a better way to list all table making a view than parsing SQL. Is there an API ? You may be able to do this using the 'explain' statement for example, I have a view called 'myview'. Wrapping this into an sql select statement and proceeding this with ex

Re: [sqlite] short_column_name(s)

2005-05-26 Thread Will Leshner
On May 26, 2005, at 12:58 PM, Hans Bieshaar wrote: Enter ".help" for instructions sqlite> .mode columns sqlite> .header on sqlite> pragma short_column_names; short_column_names Ok. I am an idiot. The 's' was just being truncated. Sorry for the noise.

Re: [sqlite] short_column_name(s)

2005-05-26 Thread Will Leshner
On May 26, 2005, at 12:58 PM, Hans Bieshaar wrote: Enter ".help" for instructions sqlite> .mode columns sqlite> .header on sqlite> pragma short_column_names; short_column_names Interesting. Then this may be a bug in my wrapper. Thanks for doing the sanity check.

RE: [sqlite] short_column_name(s)

2005-05-26 Thread Hans Bieshaar
Will Leshner wrote: >I don't know if I'd call this a bug, exactly, but if you do > >PRAGMA short_column_names > >to get the short_column_names setting, the result you get back has a >column named "short_column_name". In other words, the column name >lacks an 's' at the end. I can not reproduc

[sqlite] short_column_name(s)

2005-05-26 Thread Will Leshner
I don't know if I'd call this a bug, exactly, but if you do PRAGMA short_column_names to get the short_column_names setting, the result you get back has a column named "short_column_name". In other words, the column name lacks an 's' at the end.

Re: [sqlite] qualified names in WHERE clause

2005-05-26 Thread Jay Sprenkle
All of the databases I've used required the columns in the order by clause also be present in the result set. It may not be universally true though On 5/26/05, Cronos <[EMAIL PROTECTED]> wrote: > It seems to me that MySQL and PostgreSQL are exhibitting some dubious > guessing behaviour as to which

Re: [sqlite] database disk image is malformed

2005-05-26 Thread Christian Smith
On Thu, 26 May 2005, Drew, Stephen wrote: >Hello, > >Assuming there is no external interference, how could one cause this >error to occur through embedded use of SQLite? And why, following a >restart of my application, does it not happen again immediately? It >seems most odd... > >Any clues woul

RE: [sqlite] qualified names in WHERE clause

2005-05-26 Thread Cronos
It seems to me that MySQL and PostgreSQL are exhibitting some dubious guessing behaviour as to which column it refers to, or perhaps they are making some requirement of the order by to contain a column that is in the resultset ??? If name were only in test11 then what would MySQL and PostgreSQL do

Re: [sqlite] prepared statement and database schema changed problem

2005-05-26 Thread Peter Hermsdorf
mhm, the problem is i have to store the "Query strings" somewhere, so that i'm able to prepare them again not nice, but OK. thanks for your answer. Dennis Cote wrote: Your call to sqlite3_step() is returning an SQLITE_ERROR result. The SQLITE_SCHEMA error code will be returned by the sq

RE: [sqlite] qualified names in WHERE clause

2005-05-26 Thread Thomas Briggs
You may be the person I've encountered who is able to perceive Someone Else's Problem. :) -Tom > -Original Message- > From: Will Leshner [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 26, 2005 10:58 AM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] qualified names in

Re: [sqlite] qualified names in WHERE clause

2005-05-26 Thread Will Leshner
On May 26, 2005, at 7:49 AM, Thomas Briggs wrote: It's been our experience that the only truly reliable way to avoid this problem is to be explicit. I agree, and that's what I've always done up until now because it never occurred to me that the SQL engine would be able to figure it ou

RE: [sqlite] qualified names in WHERE clause

2005-05-26 Thread Thomas Briggs
This is a pretty common problem (for us, at least :P) - whether the columns named in the ORDER BY clause refer to columns in the source table(s) or columns in the result seems to be something that not all databases agree on. I would have thought that the SQL standard laid this out pretty clear

Re: [sqlite] qualified names in WHERE clause

2005-05-26 Thread Will Leshner
On May 26, 2005, at 7:23 AM, Gregory Letellier wrote: try SELECT Test2.* FROM test2 inner join test11 ON test2.id=test11.id ORDER By Name; Thanks. I know there are ways to get the query to work. I think the problem is when people are migrating over from another database engine and they

Re: [sqlite] prepared statement and database schema changed problem

2005-05-26 Thread Dennis Cote
Peter Hermsdorf wrote: hi, i'm using a DB base class which prepares some sql statements in it's constructor. a derived class creates additional tables in the same DB which "invalidates" the prepared statements in the base class (because of the schema change). After browsing the mailinglist i

Re: [sqlite] qualified names in WHERE clause

2005-05-26 Thread Gregory Letellier
try SELECT Test2.* FROM test2 inner join test11 ON test2.id=test11.id ORDER By Name; Will Leshner a écrit : I guess I never really noticed this before (since I only use SQLite, of course :) ). But consider a query like this: SELECT test2.* FROM test2,test11 WHERE test2.id=test11.id ORDER BY

[sqlite] qualified names in WHERE clause

2005-05-26 Thread Will Leshner
I guess I never really noticed this before (since I only use SQLite, of course :) ). But consider a query like this: SELECT test2.* FROM test2,test11 WHERE test2.id=test11.id ORDER BY name If the 'name' column happens to be a column in both test2 and test11, then SQLite will return an error.

[sqlite] database disk image is malformed

2005-05-26 Thread Drew, Stephen
Hello, Assuming there is no external interference, how could one cause this error to occur through embedded use of SQLite? And why, following a restart of my application, does it not happen again immediately? It seems most odd... Any clues would be most appreciated. This is SQLite 2.8.15. R

Re: [sqlite] philosophy behind public domain?

2005-05-26 Thread Chad Whitacre
Ulrik, Thanks for all the helpful info and links! I've written to Messrs. Rosen and Lessig asking for clarification on their apparent difference of opinion. And it looks like we're not the only ones asking the question. Here's a similar thread on the docutils list from 6 weeks ago: http:/

Re: [sqlite] how to list table making a view

2005-05-26 Thread Noel Frankinet
Hans Bieshaar wrote: Noël Frankinet wrote: >Is there a better way to list all table making a view than parsing SQL. >Is there an API ? >I would like to show all table in a view (in a tree-view gadget). >Same question for the table schema, I do parse the SQL but its rather >fragile. I

Re: [sqlite] philosophy behind public domain?

2005-05-26 Thread Florian Weimer
* D. Richard Hipp: > Public domain just seemed the easiest way to go. It is, until you want to incorporate a contribution from someone who can't give up his copyrught in a binding way. How do you handle contributions from Europe, especially Germany? Or hasn't that happened yet?

Re: [sqlite] how to list table making a view

2005-05-26 Thread Peter Hermsdorf
are you looking for something like select * from sqlite_master; ? bye, peter Noel Frankinet wrote: Hello, Is there a better way to list all table making a view than parsing SQL. Is there an API ? I would like to show all table in a view (in a tree-view gadget). Same question for the table s

RE: [sqlite] how to list table making a view

2005-05-26 Thread Hans Bieshaar
Noël Frankinet wrote: >Is there a better way to list all table making a view than parsing SQL. >Is there an API ? >I would like to show all table in a view (in a tree-view gadget). >Same question for the table schema, I do parse the SQL but its rather >fragile. I am having a bit of di

[sqlite] Can't run VACUUM command!

2005-05-26 Thread liigo
VACUUM got error... sqlite3_open(...) sqlite3_exec("VACUUM") //maybe got error sqlite3_close(...) If my database has a table that created before sqlite3_open(), I got the errcode=1, errmsg="SQL logic error or missing the database"

[sqlite] Using pragma user_version

2005-05-26 Thread Damian Slee
Hi, In the sqlite wiki below it describes the use of pragma user_version, but doesn't really say how to use it. I'm evaluating the latest sqlite.exe. Say on initial creation of me DB I set user_version to 1. then product with DB schema 1 gets released. Then at some point in the future I want

[sqlite] prepared statement and database schema changed problem

2005-05-26 Thread Peter Hermsdorf
hi, i'm using a DB base class which prepares some sql statements in it's constructor. a derived class creates additional tables in the same DB which "invalidates" the prepared statements in the base class (because of the schema change). After browsing the mailinglist i found an older discussio

[sqlite] how to list table making a view

2005-05-26 Thread Noel Frankinet
Hello, Is there a better way to list all table making a view than parsing SQL. Is there an API ? I would like to show all table in a view (in a tree-view gadget). Same question for the table schema, I do parse the SQL but its rather fragile. I'm still in 2.8 Thank you. -- Noël Frankinet Gis