ورود

View Full Version : Error converting data type varchar to bigint.



zahra_kk
پنج شنبه 29 دی 1390, 21:24 عصر
protected void Btaeed_Click(object sender, EventArgs e)
{
for (int count = 0; count < gvOrder.Rows.Count; count++)
{
con.Open();
string strId =gvOrder.Rows[count].Cells[0].Text;
string strId1 = gvOrder.Rows[count].Cells[1].Text;
string strId2 = gvOrder.Rows[count].Cells[2].Text;
DateTime strId3 = new DateTime();
strId3 = DateTime.Now;

string str = "insert into t_trancication(username,p#,quantity,date_sefaresh) values('" + HttpContext.Current.User.Identity.Name + "','" + strId + "','" + strId2 + "','" + strId3.ToString() + "')";
DataSet set = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(str, con);
da.Fill(set);
con.Close();


DataTable dt = new DataTable();
dt = (DataTable)Session["SampleDataTable"];
for (int i = 0; i < dt.Rows.Count; i++)
{
dt.Rows.Delete();
Session["SampleDataTable"] = null;
}
gvOrder.DataSource = dt;
gvOrder.DataBind();
bindGridView();
Response.Redirect("sabt.aspx

این کدمربوط میشه به درج اطلاعات داخل پایگاه داده که باکلیک دکمه رخ میده.موقع اجرااین ارور رامیده


[I]Error converting data type varchar to bigint.

کسی میتونه کمکم کنه؟فوریه