title: Parameter/Column (2) not bound Exception when connecting C# application to SAP HANA database
body: <p><br>
  I'm creating a C# application which connects to SAP HANA 2.0 database.<br>
  In my pc I installed HDBODBC and HDBODBC32 driver, both of 2.02 version.<br>
  What I'm trying to do is to create a query in which there is a parameter which is referenced in different occasions.<br>
  Here's a sample code:</p>
  
  <pre><code>string query = "SELECT :p0, :p0 FROM DUMMY";
  IDbCommand dbCommand = hanaConnection.CreateCommand();
  
  dbCommand.CommandText = query;
  
  IDataParameter param = dbCommand.CreateParameter();
  param.Value = "A";
  param.ParameterName = ":p0"; 
  
  dbCommand.Parameters.Add(param);
  
  hanaConnection.Open();
  
  IDataReader dataReader = dbCommand.ExecuteReader();
  
  while (dataReader.Read())
  {
      ReadSingleRow((IDataRecord)dataReader);
  }
  </code></pre>
  
  <p>Just to make it clearer, object <code>hanaConnection</code> implements <code>IDbConnection</code>.</p>
  
  <p>When I execute the statement <code>IDataReader dataReader = dbCommand.ExecuteReader();</code> an exception is raised: </p>
  
  <pre><code>Sap.Data.Hana.HanaException
  HResult=0x80004005
  Message=Parameter/Column (2) not bound.
  Source=SAP HANA Data Provider for Microsoft ADO.NET
  StackTrace:
     at Sap.Data.Hana.HanaCommand._ExecuteReader(CommandBehavior commandBehavior, Boolean isExecuteScalar, Boolean isBeginExecuteReader)
     at Sap.Data.Hana.HanaCommand.ExecuteReaderBatch(CommandBehavior behavior)
     at Sap.Data.Hana.HanaCommand.ExecuteDbDataReader(CommandBehavior behavior)
     at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
     ...
  </code></pre>
  
  <p>I tried to create execute a pure sql command in Hana Studio in order to understand if it's possibile to reference a parameter more than once in a <code>SELECT</code> statement and I got a correct result.<br>
  This is the sql statement I executed:</p>
  
  <pre><code>CREATE PROCEDURE PROC (IN var1 INT, IN var2 INT)
  AS
  BEGIN
     SELECT :var1, :var2, :var2 FROM DUMMY;
  END;
  
  CALL PROC (var1=&gt;1, var2=&gt;2);
  </code></pre>
  
  <p>Why an exception occures if I use .NET odbc interface? Is the attended behaviour? Do I have to create necessarily more then one parameter even if they are of the same type and value?</p>
  
  <p>Thanks</p>