setnull in parameterstatements fail
-----------------------------------

         Key: CAROB-92
         URL: https://forge.continuent.org/jira/browse/CAROB-92
     Project: Carob
        Type: Bug
  Components: C++ API  
    Versions: 0.5    
    Reporter: Simon Csaba Endre
 Assigned to: Gilles Rayrat 
     Fix For: 1.0beta


Here is the code snippet to reproduce:

ConnectionParameters connectionParameters(L"localhost", 25322, 
      L"test", L"user", L"userpass", ROUND_ROBIN, DEFAULT_RETRY_INTERVAL, true);

Connection *conn = new Connection(connectionParameters);

Statement *stmt = conn->createStatement();
stmt->execute(L"drop table t1");
stmt->execute(L"create table t1 (c1 smallint unsigned, c2 smallint)");
conn->deleteStatement(stmt);
  
ParameterStatement* pstmt = conn->createParameterStatement(L"insert into t1 
values (?, ?)");
pstmt->setInt(1, -125);
pstmt->setNull(2);

try {
  pstmt->execute();
} catch (BackendException &e) {
  wcout << L"Error: " << e.getErrorCode() << L" --- " << e.description();
}

conn->deleteStatement(pstmt);
delete conn;



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


_______________________________________________
Carob mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob

Reply via email to