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?
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?