Peter Chan
asked on
Input string was not in a correct format
Hi,
When running the below codes,
try
{
cmd = new SqlCommand("insert into dbo.tab3 (user_id,rec_id,rec_desc,c hange_date ) values (@par_id2,11,' ',getdate())", conn);
cmd.Parameters.Add("@par_i d2", SqlDbType.Int).Value = Convert.ToInt32(lb_userid. Text);
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
lb_msg.Text = ex.Message + ex.Source;
return;
}
...
I don't know why I've got this error.
Input string was not in a correct format.mscorlib
When running the below codes,
try
{
cmd = new SqlCommand("insert into dbo.tab3 (user_id,rec_id,rec_desc,c
cmd.Parameters.Add("@par_i
cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
lb_msg.Text = ex.Message + ex.Source;
return;
}
...
I don't know why I've got this error.
Input string was not in a correct format.mscorlib
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.