mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-25 15:19:21 +01:00
batch statements (multiple results) support
This commit is contained in:
@@ -1201,6 +1201,22 @@ void ODBCDB2Test::testDynamicAny()
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::testMultipleResults()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
for (int i = 0; i < 8;)
|
||||
{
|
||||
recreatePersonTable();
|
||||
_pSession->setFeature("autoBind", bindValues[i]);
|
||||
_pSession->setFeature("autoExtract", bindValues[i+1]);
|
||||
_pExecutor->multipleResults();
|
||||
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::dropObject(const std::string& type, const std::string& name)
|
||||
{
|
||||
try
|
||||
@@ -1350,7 +1366,11 @@ bool ODBCDB2Test::canConnect(const std::string& driver, const std::string& dsn)
|
||||
{
|
||||
std::cout << "DSN found: " << itDSN->first
|
||||
<< " (" << itDSN->second << ')' << std::endl;
|
||||
format(_dbConnString, "DSN=%s", dsn);
|
||||
format(_dbConnString,
|
||||
"DSN=%s;"
|
||||
"Uid=db2admin;"
|
||||
"Pwd=db2admin;",
|
||||
dsn);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1470,6 +1490,7 @@ CppUnit::Test* ODBCDB2Test::suite()
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testAsync);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testAny);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testMultipleResults);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user