WebService - pasing parameter
Posted: Mon 01 Jul 2013 17:23
Hi,
Having this code
It makes Server error 500 when I envokes with a simple int (f.ex. 58) - it drives me nuts... I think it's the way I assign the parameter that causes the matter...
-Kurt
Having this code
Code: Select all
[WebMethod]
public DataSet GetRowsById(int ROWValue_ID) {
try {
connection = new OracleConnection(ConfigurationManager.ConnectionStrings["ProviderService"].ConnectionString);
dataAdapter = new OracleDataAdapter("", connection);
dataAdapter.SelectCommand.CommandType = CommandType.Text;
dataAdapter.SelectCommand.CommandText = "SELECT ROWValue_ID, TEXT_DK, TEXT_UK FROM Table WHERE (ROWValueID=:RowvalueId) AND (OWNER_ID=3)";
dataAdapter.SelectCommand.Parameters.Add("RowvalueId",OracleDbType.Integer).OracleValue = ROWValue_ID;
dataAdapter.SelectCommand.Parameters["RowvalueId"].Direction = ParameterDirection.Input;
dataAdapter.Fill(dataSet);
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
finally
{
if (connection != null)
connection.Close();
}
return dataSet;
}
-Kurt