Author: CRP | Posted on: 8/4/2008 7:31:26 AM | Views : 248


The following is the code for inserting a new record. I have three columns in my table which is as follows

Proddesc char(5)

Price int

Quantity int

 I have three textboxes to accept the value. If i type any numbers in the price column or in the quantity column i am getting an exception as

 Error converting data type nvarchar to int.

But it does not tell which column has the invalid data. Now what i need is "Is there any code for specifying the column" which has the invalid data in the below mentioned catch block?
protected void Button1_Click(object sender, EventArgs e)
{

Go to the complete details ...