title: c++ float to sql server DECIMAL correct conversion
body: <p>I am creating an application in native c++ using odbc. I am calling on to a sql server stored procedure that has a decimal parameter. I am passing a float to that parameter. The code so far:</p>
  
  <pre><code>    SQLDECIMAL *sql_param = new SQLDECIMAL( param);
  if( SQL_ERROR == ( result = SQLBindParameter( statement_handle, 5, SQL_PARAM_INPUT, SQL_C_FLOAT, SQL_DECIMAL, 12, 6, sql_param, 0, NULL ) ) ){
      std::wstring error = get_error_message( SQL_HANDLE_STMT, statement_handle );
  
      throw GenericException( error );
  }
  </code></pre>
  
  <p>param is a float.</p>
  
  <p>What gets stored on the table is always 0 instead of the real value which is 1.45. I'm guessing some conversion is taking place but I can't figured out the correct conversion. SQL_C_FLOAT -> SQL_DECIMAL?</p>