PDA

View Full Version : question about sqlite ( qt 4 )



msmihai
18th December 2008, 18:47
hello everybody. i wrote a simple application that creates a database.



db = QSqlDatabase::addDatabase("QSQLITE");
db.setHostName("home");
db.setDatabaseName(text1);
db.setUserName(text2);
db.setPassword(text3);
ok = db.open();


the dabase creates ok . i re-run my program and try opening the same database but with different username and password. it opens quite fine without giving an error about wrong username or password. what am i doing wrong?

giusepped
19th December 2008, 03:42
I think SQLITe does not support passwords....
G

yunpeng880
19th December 2008, 08:35
hello everybody. i wrote a simple application that creates a database.



db = QSqlDatabase::addDatabase("QSQLITE");
db.setHostName("home");
db.setDatabaseName(text1);
db.setUserName(text2);
db.setPassword(text3);
ok = db.open();


the dabase creates ok . i re-run my program and try opening the same database but with different username and password. it opens quite fine without giving an error about wrong username or password. what am i doing wrong?

yes,qslite is embed database,it's not support password i think