[sqlite] sqlite_sequence lacks a PK definition

2007-02-14 Thread Brodie Thiesfield
Hi, At the moment the sqlite_sequence table: * doesn't exist when a database is first created * is created when an AUTOINCREMENT table is created * doesn't use a primary key on the name column * doesn't get populated with the sequence row for a table until a row is added to the table. Would addin

Re: [sqlite] get column names in sqlite

2007-02-14 Thread larsk
Dennis Cote wrote: > > larsk wrote: >> I am making an applikation in c# that uses a sqlite-database. >> Is there someone who knows how to get the column names from a table using >> sql? >> > See Pragma table_info() at http://www.sqlite.org/pragma.html#schema > > HTH > Dennis Cote > > Than

Re: [sqlite] get column names in sqlite

2007-02-14 Thread Dennis Cote
larsk wrote: I am making an applikation in c# that uses a sqlite-database. Is there someone who knows how to get the column names from a table using sql? See Pragma table_info() at http://www.sqlite.org/pragma.html#schema HTH Dennis Cote -

Re: [sqlite] Can't get results from PRAGMA

2007-02-14 Thread Hakki Dogusan
Hi, (I hope we are not getting off-topic) Paul Simpson wrote: Hi, [snip] Try as I might, I cn't get it working, so I think you have the advantage! I'm trying to get the sample to work first, but I get LOADS of errors at the linking phase (undefined references to things like sqlite3_free.) An

[sqlite] get column names in sqlite

2007-02-14 Thread larsk
I am making an applikation in c# that uses a sqlite-database. Is there someone who knows how to get the column names from a table using sql? -- View this message in context: http://www.nabble.com/get-column-names-in-sqlite-tf3230017.html#a8974503 Sent from the SQLite mailing list archive at Nabb

Re: [sqlite] Can't get results from PRAGMA

2007-02-14 Thread Paul Simpson
> Hi, > > Paul Simpson wrote: >>> Hi, >>> >>> Paul Simpson wrote: Hi, I'm trying to use the dll version of SQLite within an application written in C++ using wxWidgets. >>> [snip] >>> >>> >>> In case you missed, there is already an interface: >>> >>> http://wxcode.sour

Re: [sqlite] Patch: sqlite3_query_string

2007-02-14 Thread Wesley W. Terpstra
On Feb 14, 2007, at 4:29 PM, Wesley W. Terpstra wrote: Please consider applying the attached patch It seems this mailing list strips file attachments. The patch is now available at As it's so short, you probably don't need a copyright disclaim

Re: [sqlite] Re: another

2007-02-14 Thread P Kishor
Hi Sam, On 2/14/07, Samuel R. Neff <[EMAIL PROTECTED]> wrote: Personally, I think the column names given to a result set from a SELECT by itself should be the same column names given to a table created through CREATE TABLE AS. For example, the following sql: .headers on create table a(col1 tex

RE: [sqlite] Re: another

2007-02-14 Thread Samuel R. Neff
Personally, I think the column names given to a result set from a SELECT by itself should be the same column names given to a table created through CREATE TABLE AS. For example, the following sql: .headers on create table a(col1 text, col text); create table b(col2 text, col text); insert into a(

[sqlite] Patch: sqlite3_query_string

2007-02-14 Thread Wesley W. Terpstra
Please consider applying the attached patch to SQLite3. It adds support for a method sqlite3_query_string(sqlite3_stmt*); This is helpful for error reporting when query execution fails. It's also helpful if an application needs to clone an existing query. It is the logical analogue of sqlit

RE: [sqlite] Re: another

2007-02-14 Thread Anderson, James H \(IT\)
A syntax error, "duplicate column name". -Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 14, 2007 10:24 AM To: SQLite Subject: [sqlite] Re: another Anderson, James H (IT) wrote: > If I run the following sql > > create table table_C as > selec

[sqlite] Re: another

2007-02-14 Thread Igor Tandetnik
Anderson, James H (IT) wrote: If I run the following sql create table table_C as select A.col_1, B.col_2 from table_A A, table_B B where A.col_3 = B.col_4 The table_C is created with the following column names: "A.col_1", "B.col_2" It seems to me sqlite should strip off the alias q

[sqlite] another

2007-02-14 Thread Anderson, James H \(IT\)
If I run the following sql create table table_C as select A.col_1, B.col_2 from table_A A, table_B B where A.col_3 = B.col_4 The table_C is created with the following column names: "A.col_1", "B.col_2" Quotes and all. How bizarre is that? Am I doing something wrong? (The only way arou

RE: [sqlite] help with syntax

2007-02-14 Thread Anderson, James H \(IT\)
That did the trick. Thanks very much. jim -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 13, 2007 4:55 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] help with syntax Anderson, James H (IT) wrote: > I have the following sybase query (a left

Re: [sqlite] Can't get results from PRAGMA

2007-02-14 Thread Hakki Dogusan
Hi, Paul Simpson wrote: Hi, Paul Simpson wrote: Hi, I'm trying to use the dll version of SQLite within an application written in C++ using wxWidgets. [snip] In case you missed, there is already an interface: http://wxcode.sourceforge.net/components/wxsqlite3 -- Regards, Hakki Dogusan

Re: [sqlite] Can't get results from PRAGMA

2007-02-14 Thread Paul Simpson
> Hi, > > Paul Simpson wrote: >> Hi, >> >> I'm trying to use the dll version of SQLite within an application >> written >> in C++ using wxWidgets. >> > [snip] > > > In case you missed, there is already an interface: > > http://wxcode.sourceforge.net/components/wxsqlite3 > > > -- > Regards, > Hakki

Re: [sqlite] Can't get results from PRAGMA

2007-02-14 Thread Hakki Dogusan
Hi, Paul Simpson wrote: Hi, I'm trying to use the dll version of SQLite within an application written in C++ using wxWidgets. [snip] In case you missed, there is already an interface: http://wxcode.sourceforge.net/components/wxsqlite3 -- Regards, Hakki Dogusan --

Re: [sqlite] Can't get results from PRAGMA

2007-02-14 Thread Paul Simpson
> >> wxString getDBVersion = "PRAGMA user_version = 2;"; >> rc = (sqlPrepareAdd)(newdb,getDBVersion.c_str(),getDBVersion.length(), >> &pStmt, &pzTail); >> >> if(rc != SQLITE_OK){ >> wxString msg; >> msg.Printf(wxT("Can't process database: >> %s"),(sqlErrMs

Re: [sqlite] Can't get results from PRAGMA

2007-02-14 Thread Dan Kennedy
> wxString getDBVersion = "PRAGMA user_version = 2;"; > rc = (sqlPrepareAdd)(newdb,getDBVersion.c_str(),getDBVersion.length(), > &pStmt, &pzTail); > > if(rc != SQLITE_OK){ > wxString msg; > msg.Printf(wxT("Can't process database: > %s"),(sqlErrMsgAdd

Re: [sqlite] SQLite-3.3.13

2007-02-14 Thread Martin Jenkins
Martin Jenkins wrote: I haven't tested the other versions of Tcl yet. I have now. s/a/RDRW/ makes corrupt2.test work with Tcl 8.4.9, 8.4.12, 8.4.14 and 8.5a5 on recent versions of Debian/Ubuntu on sparc64 and x86. Martin -

[sqlite] Can't get results from PRAGMA

2007-02-14 Thread Paul Simpson
Hi, I'm trying to use the dll version of SQLite within an application written in C++ using wxWidgets. I couldn't get the callback function working using C++, so I am trying to use the prepare / step etc. series of functions. OK, when my user opens a file, I want to make use of the USER_VERSION P

Re: [sqlite] SQLite-3.3.13

2007-02-14 Thread Martin Jenkins
[EMAIL PROTECTED] wrote: I get the same problem on OS-X. But it appears to be a bug in the older version of TCL you have installed, not in SQLite itself. Nothing to worry about. Thanks for reporting it, though. I was trying to make a test case to report the Tcl bug and noticed that (in 8.5a