GH #290: Unicode support

This commit is contained in:
Alex Fabijanic
2014-05-21 03:28:24 -05:00
parent 8b39a87fd6
commit 1aa28e1491
46 changed files with 1168 additions and 114 deletions

View File

@@ -715,6 +715,17 @@ void ODBCSQLServerTest::recreateLogTable()
}
void ODBCSQLServerTest::recreateUnicodeTable()
{
#if defined (POCO_ODBC_UNICODE)
dropObject("TABLE", "UnicodeTable");
try { session() << "CREATE TABLE UnicodeTable (str NVARCHAR(30))", now; }
catch (ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail("recreateUnicodeTable()"); }
catch (StatementException& se){ std::cout << se.toString() << std::endl; fail("recreateUnicodeTable()"); }
#endif
}
CppUnit::Test* ODBCSQLServerTest::suite()
{
if ((_pSession = init(_driver, _dsn, _uid, _pwd, _connectString, _db)))
@@ -801,6 +812,7 @@ CppUnit::Test* ODBCSQLServerTest::suite()
CppUnit_addTest(pSuite, ODBCSQLServerTest, testTransaction);
CppUnit_addTest(pSuite, ODBCSQLServerTest, testTransactor);
CppUnit_addTest(pSuite, ODBCSQLServerTest, testNullable);
CppUnit_addTest(pSuite, ODBCSQLServerTest, testUnicode);
CppUnit_addTest(pSuite, ODBCSQLServerTest, testReconnect);
return pSuite;