SQLBindParam: setting Null value fails (ODBC)
<p>I am trying to bind an NULL-Value to a parameter in a sql query but I always get an error <em>HY009 Invalid argument value</em> when I execute the statement. That strange behavior only appears when I build in release mode. In debug mode it's working fine. Any ideas?</p>

<p>My Code:</p>

<pre><code>SQLRETURN nRet = SQLPrepare(m_hStmt, (SQLTCHAR *)strSQL, SQL_NTS); // returns SQL_SUCCESS
SQLINTEGER cbNumeric = SQL_NULL_DATA;
nRet = SQLBindParameter(m_hStmt, 
                parameterIndex,     
                SQL_PARAM_INPUT,    
                SQL_C_CHAR,         
                SQL_LONGVARCHAR,    
                0,                  
                NULL,               
                NULL,       
                0,                  
                &amp;cbNumeric); // returns SQL_SUCCESS
nRet = SQLExecute(m_hStmt); // returns SQL_NEED_DATA
nRet = _SQLParamDataPutData(nRet); // returns Debug: SQL_SUCCESS, Release: SQL_ERROR    
</code></pre>