wxSqlite3 and Creating Virtual tables...

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Post Reply
ouch67
Earned some good credits
Earned some good credits
Posts: 135
Joined: Sun Mar 23, 2008 12:09 am

wxSqlite3 and Creating Virtual tables...

Post by ouch67 »

What is the best way to create a table that say consists of 3 columns:

Name char, Price real, Qty real

I don't see where this could be done using wxSqlite3 unless I'm missing something.

(I probably am, ;) )

I just want to create a table that I can use but doesn't actually get saved. Is there a better way than virtual tables?
User avatar
doublemax
Moderator
Moderator
Posts: 19102
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxSqlite3 and Creating Virtual tables...

Post by doublemax »

sqlite supports ":memory:" as a special filename, this will create an in-memory database. I suppose it also works with wxSQlite3.
Use the source, Luke!
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSqlite3 and Creating Virtual tables...

Post by utelle »

ouch67 wrote:What is the best way to create a table that say consists of 3 columns:

Name char, Price real, Qty real

I don't see where this could be done using wxSqlite3 unless I'm missing something.

(I probably am, ;) )
If you are actually referring to SQLite's virtual tables based on the virtual table mechanism, then you haven't missed anything, since wxSQLite3 has no special support for implementing such virtual tables. This would be way beyond the scope of wxSQLite3.

However, from your below comment I get the impression that ...
ouch67 wrote: I just want to create a table that I can use but doesn't actually get saved. Is there a better way than virtual tables?
... what you really want to have, are temporary tables which can be created using the SQL command CREATE TEMPORARY TABLE.

Temporary tables are only visible to the database connection in which they were created, and temporary tables are always automatically deleted when the database connection is closed.

Regards,

Ulrich
ouch67
Earned some good credits
Earned some good credits
Posts: 135
Joined: Sun Mar 23, 2008 12:09 am

Re: wxSqlite3 and Creating Virtual tables...

Post by ouch67 »

Ah, I see. Thanks to you both.
Post Reply