Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 2

Qt-interest Archive, May 2007
QSqlRecord to create a table?


Message 1 in thread

Hi,

the help says "The QSqlRecord class encapsulates a database record."... well, 
only for accessing the data inside the table? Or can I create a complete 
database table with it? 
The problem is, that - if I use a CREATE statement in QSqlQuery - I have to 
decide, which SQL-Syntax I use: SQL from Redmond or SQL from the rest of the 
world... and how do I create Indices then (same problem). And relations, too.

--
 [ signature omitted ] 

Message 2 in thread

Hi,

that's the price to pay i fear.
We support 4 differnet databases with our app (SQLite, MS Access via
ODBC, MySQL and PSQL) - it's kind of a hell.

Especially when it comes to date, times, .. each uses it's own date and
time format; so you have to adjust your SQL queries. And we also
subclassed tables - because each date, time, .. is represented differently.

So - have phun talking different sql dialects,

RZ

> Hi,
> 
> the help says "The QSqlRecord class encapsulates a database record."... well, 
> only for accessing the data inside the table? Or can I create a complete 
> database table with it? 
> The problem is, that - if I use a CREATE statement in QSqlQuery - I have to 
> decide, which SQL-Syntax I use: SQL from Redmond or SQL from the rest of the 
> world... and how do I create Indices then (same problem). And relations, too.
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ] 

Message 3 in thread

On Saturday 05 May 2007 11:27:45 RZ wrote:
> Hi,
>
> that's the price to pay i fear.
> We support 4 differnet databases with our app (SQLite, MS Access via
> ODBC, MySQL and PSQL) - it's kind of a hell.
>
> Especially when it comes to date, times, .. each uses it's own date and
> time format; so you have to adjust your SQL queries. And we also
> subclassed tables - because each date, time, .. is represented differently.

Oh - thats what I learned really fast: never save Date/Time as DT, but as 
String or long. And never use bit fields. 
Is there an sql statement to create references?

--
 [ signature omitted ]