[Development] important:qt connect mssql on linux

pengliang(彭亮) pengliang at founder.com
Wed Oct 10 04:11:59 CEST 2012


Hi list,

         I have compiled libqsqlodbc.so on redhat64bit successfully. 

When I run the snippets bellow some error message occurred.

 

QString Dsn = QString::fromLocal8Bit("Driver={sql server};server=172.2.2.2;database=Live;uid=an;pwd=an;");

QSqlDatabase::addDatabase("QODBC");

 

Error msg:

QSqlError(0, "QODBC3: Unable to connect", "[unixODBC][Driver Manager]Data source name not found, and no default driver specified")

 

But I found QODBC is available driver:

"QSQLITE" 

"QMYSQL3" 

"QMYSQL" 

"QODBC3" 

"QODBC" 

 

Could anybody tell me why?

1. I found /etc/odbc.ini is empty, and /home/dd/.odbc.ini does not exist. Is this clue useful?

 

Thanks a lot

Ken

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121010/8bb2afdd/attachment.html>


More information about the Development mailing list