This commit is contained in:
Aleksandar Fabijanic
2007-06-08 01:33:56 +00:00
parent 649415d3b9
commit 8b374cd84b
5 changed files with 82 additions and 163 deletions

View File

@@ -926,7 +926,7 @@ void ODBCOracleTest::testStoredProcedure()
k += 2;
}
//string and BLOB for automatic binding only
//std::string automatic binding only
_pSession->setFeature("autoBind", true);
*_pSession << "CREATE OR REPLACE "
@@ -934,27 +934,20 @@ void ODBCOracleTest::testStoredProcedure()
" BEGIN outParam := inParam; "
"END storedProcedure;" , now;
std::string inParam = "123";
std::string inParam =
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
std::string outParam;
try{
*_pSession << "{call storedProcedure(?,?)}", in(inParam), out(outParam), now;
}catch(StatementException& ex){std::cout << ex.toString();}
assert(inParam == outParam);
dropObject("PROCEDURE", "storedProcedure");
/*TODO - currently failing
*_pSession << "CREATE OR REPLACE "
"PROCEDURE storedProcedure(inParam IN BLOB, outParam OUT BLOB) IS "
" BEGIN outParam := inParam; "
"END storedProcedure;" , now;
BLOB inBLOB = "123";
BLOB outBLOB;
try{
*_pSession << "{call storedProcedure(?,?)}", in(inBLOB), out(outBLOB), now;
}catch(StatementException& ex){std::cout << ex.toString();}
assert(inBLOB == outBLOB);
dropObject("PROCEDURE", "storedProcedure");
*/
}