D
Dave Cullen
I have a C# database app (someone else's code) that started crashing
when I changed some values in a data table. If I use numeric data in
this field, it works OK. Changing to non-numeric strings causes Oracle's
ORA-01722 error (invalid number). I know what is wrong, but I don't know
how to fix the application to allow non-numeric data. The table data is
VARCHAR2.
This is a snippet from the code that crashes:
CCNUMBER is the column that I added some non-numeric data into.
string cmd = "SELECT NONINCREMENTING FROM PXCCDB WHERE CCNUMBER = " +
cboProxCC.SelectedItem.ToString().Trim() + " ORDER BY CCNUMBER";
OleDbDataAdapter da = new OleDbDataAdapter(cmd, cnCPS); // cnCPS is the
connection
DataSet ds = new DataSet();
try
{
da.Fill(ds, "ProxCC"); // throws exception here
}
What is "ProxCC"? I can't find any references to that name in the
application. And how does the text data from the database get assigned
to a number? That's the part I can't figure out.
when I changed some values in a data table. If I use numeric data in
this field, it works OK. Changing to non-numeric strings causes Oracle's
ORA-01722 error (invalid number). I know what is wrong, but I don't know
how to fix the application to allow non-numeric data. The table data is
VARCHAR2.
This is a snippet from the code that crashes:
CCNUMBER is the column that I added some non-numeric data into.
string cmd = "SELECT NONINCREMENTING FROM PXCCDB WHERE CCNUMBER = " +
cboProxCC.SelectedItem.ToString().Trim() + " ORDER BY CCNUMBER";
OleDbDataAdapter da = new OleDbDataAdapter(cmd, cnCPS); // cnCPS is the
connection
DataSet ds = new DataSet();
try
{
da.Fill(ds, "ProxCC"); // throws exception here
}
What is "ProxCC"? I can't find any references to that name in the
application. And how does the text data from the database get assigned
to a number? That's the part I can't figure out.