I am trying to write a very simple webpage using Visual Studio 2010, .Net 4, C#. I am using the Oracle DataAccess .DLL and have made a connection to the database just fine. When I run this code, I get the exception 'ORA-01426: Numeric Overflow." I am not doing any calculations, and I put the whole thing into a string before I submit the query. Below is my code sample:
string sql = "SELECT * from users.training WHERE per_id_no = " + strIdNo;
OracleCommand cmd = new OracleCommand(sql, conn);
cmd.CommandType = System.Data.CommandType.Text;
try
{
Label1.Visible = false;
//Read data from the database
OracleDataReader dr = cmd.ExecuteReader(); // C#
dr.Read();