AnsweredAssumed Answered

Does MapR ODBC Driver support multiple parameters?

Question asked by yan on Jul 12, 2013
I am trying to execute a query
<code>

'select * from mytable where tablekey1=? and tablekey2=?'
</code>

uses OdbcCommand.Execute, and OdbcCommand.Parameters. If I use one parameter, it works and returns results. However if i use two parameters, I got empty result back, which is not correct. My codes are,

<code>
connection.Open();
command.CommandText = "select * from mytable where tablekey1=? and tablekey2=?";

OdbcParameter param1 = new OdbcParameter();
param1.DbType = DbType.Int32;
param1.Value = 460429;
command.Parameters.Add(param1);

OdbcParameter param2 = new OdbcParameter();
param2.DbType = DbType.Int32;
param2.Value = 4030;

command.Parameters.Add(param2);

 // Execute the DataReader and access the data.
OdbcDataReader reader = command.ExecuteReader();

</code>

My question, is MapR ODBC driver support multiple parameters?

Thanks,

Outcomes