PDA

View Full Version : Can we build database in QT4??



mind_freak
11th July 2009, 12:43
hii
i want to know that can we make database in QT or QT just only provide medium to connect to the prepared database???

Regards

PaceyIV
11th July 2009, 12:48
hii
i want to know that can we make database in QT or QT just only provide medium to connect to the prepared database???

Regards

See the examples in the qt source code. You can create a database using the SQL o SQLITE query commands.

mind_freak
11th July 2009, 13:00
hii

i am new to this website so plz can you provide me the link to the qt source code...

PaceyIV
11th July 2009, 13:06
hii

i am new to this website so plz can you provide me the link to the qt source code...

Puoi scaricare tutto da qui http://www.qtsoftware.com/downloads

genessr
13th July 2009, 14:40
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");

// create the database
db.setDatabaseName("payroll.db");

QSqlQuery query;

// create the table
query.exec("create table employee (empid int primary key, "
"name varchar(50), department varchar(20))");

// insert records
query.exec("insert into employee values(1001, 'John', 'Accounting Dept')");
query.exec("insert into employee values(1002, 'Rey', 'Personnel Dept')");