[sqlite] sqlite3_column_decltype view union

2007-05-07 Thread Luca Moratto
Hi all, I have this view: CREATE VIEW MY_VIEW AS SELECT tip AS MYVIEW_TIP, abil AS MYVIEW_ABIL FROM table1 UNION SELECT tip,'S' FROM table2 I have defined columns with declared type 'CHAR' in the original tables If I use sqlite3_column_decltype to get my declared type I get CHAR for th

Re: [sqlite] Different ROWID and PRIMARY KEY values

2007-03-12 Thread Luca Moratto
Gerry Snyder ha scritto: Luca Moratto wrote: Thanks Gerry, but I can Create my table in memory from an attached db, I can Insert new rows and I can Select the new rows and all values are correct, except for my key field that is 0. My Insert statement is INSERT INTO myTable VALUES

Re: [sqlite] Different ROWID and PRIMARY KEY values

2007-03-08 Thread Luca Moratto
Thanks Gerry, but I can Create my table in memory from an attached db, I can Insert new rows and I can Select the new rows and all values are correct, except for my key field that is 0. My Insert statement is INSERT INTO myTable VALUES (?,?,?); I prepare this statement with sqlite3_prepare I

[sqlite] Different ROWID and PRIMARY KEY values

2007-03-08 Thread Luca Moratto
Hi, I'm using c++ interface for SQLite 3.3.8. 1) I open a db in memory, 2) attach a file with one table with a INTEGER PRIMARY KEY (ATTACH DATABASE 'SQliteFile.s3db' AS 'attachedDb'), 3) copy in memory the tble from attached db table (CREATE TABLE 'myTable' AS SELECT * FROM 'attachedDb.myTable