hi i want to update the row and i used the following piece of code but it gives me error at sqlDbtype error is "The name sqlDbtype does not exist in the current context."
here is code
protected void UpdateRecord(object sender, GridViewUpdateEventArgs e){
string CampaignIDRange = ((Label)noticeDetails.Rows[e.RowIndex]
.FindControl("txtCampaignIDRange")).Text;
string PromoStartDate = ((TextBox)noticeDetails.Rows[e.RowIndex]
.FindControl("txtPromoStartDate")).Text;
string PromoEndDate = ((TextBox)noticeDetails.Rows[e.RowIndex]
.FindControl("txtPromoEndDate")).Text;
string ExecutionDate = ((TextBox)noticeDetails.Rows[e.RowIndex]
.FindControl("txtExecutionDate")).Text;
string ExpiryDate = ((TextBox)noticeDetails.Rows[e.RowIndex]
.FindControl("txtExpiryDate")).Text;
OdbcConnection con = new OdbcConnection(@"Dsn=TD;uid=up_sabahath;pwd=chemistry111;Type=Teradata;database=dp_tmp;");
OdbcCommand cmd = new OdbcCommand(); cmd.CommandType = CommandType.Text;
cmd.CommandText = "update Record set CampaignIDRange=@CampaignIDRange,PromoStartDate=@PromoStartDate,PromoEndDate=@PromoEndDate,ExecutionDate=@ExecutionDate,ExpiryDate=@ExpiryDate, where CampaignIDRange=@CampaignIDRange";
cmd.Parameters.Add("@CampaignIDRange", sqlDbType.Int).Value = CampaignIDRange;
cmd.Parameters.Add("@ PromoStartDate", sqlDbType.datetime).Value = PromoStartDate;
cmd.Parameters.Add("@ PromoStartDate", sqlDbType.datetime).Value = PromoEndDate;
cmd.Parameters.Add("@ ExecutionDate", sqlDbType.datetime).Value = ExecutionDate;
cmd.Parameters.Add("@ExpiryDate", sqlDbType.datetime).Value = ExpiryDate;
noticeDetails.EditIndex = -1; noticeDetails.DataSource = dt;
noticeDetails.DataBind();}
please help me.