QT + ODBC Connection Pooling
General and Desktop
2
Posts
2
Posters
2.1k
Views
1
Watching
-
Hello!
I want to use a connection pooling in my application. I wrote a simple test:
@
QString connectionString = QString::fromLatin1(
"DRIVER={SQL Server Native Client 10.0};SERVER=%1;DATABASE=%2;")
.arg("DESIGNER\SQLEXPRESS")
.arg("testdb");QString opts = QLatin1String("SQL_ATTR_CONNECTION_POOLING=SQL_CP_ONE_PER_HENV"); QSqlDatabase db = QSqlDatabase::addDatabase(QLatin1String("QODBC3")); db.setDatabaseName(connectionString); db.setConnectOptions(opts); db.setUserName("root"); db.setPassword("1"); while (1) { db.open(); QThread::msleep(100); }
@
In Performance Monitor i do not observe any ODBC Connection Pooling activity. What's wrong?