<asp:Panel Runat="server" ID="DataVisible1Panel2" Visible="false">
<asp:datagrid id="DataVisible2" runat="server" CssClass="datagrid1" DataKeyField="id" OnItemCommand="EditCommands"
AutoGenerateColumns="false" CellPadding="0" CellSpacing="0" OnPageIndexChanged="DataVisible1_Next"
Allowpaging="false" pageSize="1" PagerStyle-Mode="NumericPages" PagerStyle-PageButtonCount="1"
PagerStyle-HorizontalAlign="right" ShowFooter="False" ShowHeader="False" BorderStyle="solid"
BorderColor="#C0C0C0" BorderWidth="0" PagerStyle-Visible="false">
<columns>
<asp:templatecolumn>
<itemtemplate>
<table class="DataVisible1Table1" bgColor="#ebebeb" border="1" bordercolor="#c0c0c0" style="BORDER-COLLAPSE: collapse"
cellSpacing="0" cellPadding="0" width="100%" align="center">
<tr>
<td>
<TABLE class="PeiJianManageInputTable">
<TR>
<TD>配件管理</TD>
</TR>
</TABLE>
<TABLE class="PeiJianManageInputTable1">
<TR>
<TD class="PeiJianManageInputTable1Td">配件名称</TD>
<TD><INPUT class="css_input" id="Text24" value='<%# DataBinder.Eval(Container.DataItem,"Title")%>' type="text" name="txtNumberPlate" runat="server"></TD>
<TD class="PeiJianManageInputTable1Td">供应商</TD>
<TD><INPUT class="css_input" id="Text25" value='<%# DataBinder.Eval(Container.DataItem,"Provider")%>' type="text" name="txtConsignCorporation" runat="server"></TD>
</TR>
<TR>
<TD class="PeiJianManageInputTable1Td">进价</TD>
<TD><INPUT class="css_input" id="Text26" value='<%# DataBinder.Eval(Container.DataItem,"PurchasePrice")%>' type="text" name="txtVehicleModel" runat="server"></TD>
<TD class="PeiJianManageInputTable1Td">售价</TD>
<TD><INPUT class="css_input" id="Text27" value='<%# DataBinder.Eval(Container.DataItem,"Price")%>' type="text" name="txtMilemeter" runat="server"></TD>
</TR>
<TR>
<TD class="PeiJianManageInputTable1Td">购货时间</TD>
<TD><INPUT class="css_input" id="Text28" value='<%# DataBinder.Eval(Container.DataItem,"BuyDate")%>' type="text" name="txtClientPhone" runat="server"></TD>
</TABLE>
<TABLE class="PeiJianManageInputTable2">
<TR>
<TD>货架号</TD>
<TD>货架位数</TD>
<TD>货架层数</TD>
</TR>
<TR>
<TD><INPUT class="css_input" id="Text29" value='<%# DataBinder.Eval(Container.DataItem,"Mark")%>' type="text" name="txtTitle" runat="server"></TD>
<TD><INPUT class="css_input" id="Text30" value='<%# DataBinder.Eval(Container.DataItem,"Digit")%>' type="text" name="txtUnit" runat="server"></TD>
<TD><INPUT class="css_input" id="Text31" value='<%# DataBinder.Eval(Container.DataItem,"Floor")%>' type="text" name="txtAmount" runat="server"></TD>
</TR>
</TABLE>
<TABLE class="PeiJianManageInputTable3">
<TR>
<TD>存货量</TD>
<TD>出货量</TD>
<TD>总数量</TD>
</TR>
<TR>
<TD><INPUT class="css_input" id="Text32" value='<%# DataBinder.Eval(Container.DataItem,"Merchandise")%>' type="text" name="txtTitle" runat="server"></TD>
<TD><INPUT class="css_input" id="Text33" value='<%# DataBinder.Eval(Container.DataItem,"Shipment")%>' type="text" name="txtShipment" runat="server"></TD>
<TD><INPUT class="css_input" id="Text34" value='<%# DataBinder.Eval(Container.DataItem,"TotalAmount")%>' type="text" name="txtAmount" runat="server"></TD>
</TR>
</TABLE>
<TABLE class="PeiJianManageInputTable5">
<TR>
<TD class="PeiJianManageInputTable5Td1" height="10"></TD>
<TD class="PeiJianManageInputTable5Td2" align="right">
<asp:ImageButton id="Imagebutton13" onclick="onclick_updateinfo" runat="server" ImageUrl="/Images/ok-02.gif"
borderstyle="none" CommandName="update"></asp:ImageButton>
<asp:ImageButton id="Imagebutton14" onclick="onclick_canel" runat="server" ImageUrl="/Images/canel-01.gif"
borderstyle="none" CommandName="canel"></asp:ImageButton>
<SPAN onclick="return Confirm_Del();">
<asp:ImageButton id="Imagebutton15" onclick="onclick_deleteinfo" runat="server" ImageUrl="/Images/delete-01.gif" borderstyle="none" CommandName="delete"></asp:ImageButton>
</SPAN>
</TD>
</TR>
</TABLE>
</td>
</tr>
</table>
</itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
</asp:Panel>==================================================
.cs
//编辑数据
public void EditCommands(Object sender, DataGridCommandEventArgs e)
{
connectionstr();
int editID = (int) DataVisible2.DataKeys[e.Item.ItemIndex]; //更新数据
if (e.CommandName == "update")
{
// try
// {
// shbConn.Open();
// shbUpdateData="UPDATE PeiJianManage SET Title='" + txtTitle.Value
// + "',Provider='" + txtProvider.Value
// + "',PurchasePrice='" + txtPurchasePrice.Value
// + "',Price='" + txtPrice.Value
// + "',BuyDate='" + txtBuyDate.Value
// + "',TotalAmount='" + txtTotalAmount.Value
// + "',Mark='" + txtMark.Value
// + "',Digit='" + txtDigit.Value
// + "',Floor='" + txtFloor.Value
// + "'WHERE id=" + editID.ToString(); HtmlInputText txtTitle=(HtmlInputText)e.Item.FindControl("txtTitle");
HtmlInputText txtProvider=(HtmlInputText)e.Item.FindControl("txtProvider");
HtmlInputText txtPurchasePrice=(HtmlInputText)e.Item.FindControl("txtPurchasePrice");
HtmlInputText txtPrice=(HtmlInputText)e.Item.FindControl("txtPrice");
HtmlInputText txtBuyDate=(HtmlInputText)e.Item.FindControl("txtBuyDate");
HtmlInputText txtTotalAmount=(HtmlInputText)e.Item.FindControl("txtTotalAmount");
HtmlInputText txtMark=(HtmlInputText)e.Item.FindControl("txtMark");
HtmlInputText txtDigit=(HtmlInputText)e.Item.FindControl("txtDigit");
HtmlInputText txtShipment=(HtmlInputText)e.Item.FindControl("txtShipment");
HtmlInputText txtFloor=(HtmlInputText)e.Item.FindControl("txtFloor");
shbConn.Open();
// shbUpdateData="UPDATE PeiJianManage SET Title='" + txtTitle + "','" + Provider=txtProvider + "','" + PurchasePrice=txtPurchasePrice + "','" + Price=txtPrice + "','" + BuyDate=txtBuyDate + "','" + Mark=txtMark + "','" + Digit=txtDigit + "','" + Floor=txtFloor + "','" + Shipment=txtShipment + "','" + TotalAmount=txtTotalAmount + "' WHERE id=" + editID.ToString();
shbUpdateData="UPDATE PeiJianManage SET Title=txtTitle,Provider=txtProvider,PurchasePrice=txtPurchasePrice,Price=txtPrice,BuyDate=txtBuyDate,Mark=txtMark,Digit=txtDigit,Floor=txtFloor,Shipment=txtShipment,TotalAmount=txtTotalAmount WHERE id=" + editID.ToString(); shbComm=new OleDbCommand(shbUpdateData,shbConn);
shbComm.ExecuteNonQuery();
shbConn.Close();
connection4();
// }
// catch
// {
// }
}
<asp:datagrid id="DataVisible2" runat="server" CssClass="datagrid1" DataKeyField="id" OnItemCommand="EditCommands"
AutoGenerateColumns="false" CellPadding="0" CellSpacing="0" OnPageIndexChanged="DataVisible1_Next"
Allowpaging="false" pageSize="1" PagerStyle-Mode="NumericPages" PagerStyle-PageButtonCount="1"
PagerStyle-HorizontalAlign="right" ShowFooter="False" ShowHeader="False" BorderStyle="solid"
BorderColor="#C0C0C0" BorderWidth="0" PagerStyle-Visible="false">
<columns>
<asp:templatecolumn>
<itemtemplate>
<table class="DataVisible1Table1" bgColor="#ebebeb" border="1" bordercolor="#c0c0c0" style="BORDER-COLLAPSE: collapse"
cellSpacing="0" cellPadding="0" width="100%" align="center">
<tr>
<td>
<TABLE class="PeiJianManageInputTable">
<TR>
<TD>配件管理</TD>
</TR>
</TABLE>
<TABLE class="PeiJianManageInputTable1">
<TR>
<TD class="PeiJianManageInputTable1Td">配件名称</TD>
<TD><INPUT class="css_input" id="Text24" value='<%# DataBinder.Eval(Container.DataItem,"Title")%>' type="text" name="txtNumberPlate" runat="server"></TD>
<TD class="PeiJianManageInputTable1Td">供应商</TD>
<TD><INPUT class="css_input" id="Text25" value='<%# DataBinder.Eval(Container.DataItem,"Provider")%>' type="text" name="txtConsignCorporation" runat="server"></TD>
</TR>
<TR>
<TD class="PeiJianManageInputTable1Td">进价</TD>
<TD><INPUT class="css_input" id="Text26" value='<%# DataBinder.Eval(Container.DataItem,"PurchasePrice")%>' type="text" name="txtVehicleModel" runat="server"></TD>
<TD class="PeiJianManageInputTable1Td">售价</TD>
<TD><INPUT class="css_input" id="Text27" value='<%# DataBinder.Eval(Container.DataItem,"Price")%>' type="text" name="txtMilemeter" runat="server"></TD>
</TR>
<TR>
<TD class="PeiJianManageInputTable1Td">购货时间</TD>
<TD><INPUT class="css_input" id="Text28" value='<%# DataBinder.Eval(Container.DataItem,"BuyDate")%>' type="text" name="txtClientPhone" runat="server"></TD>
</TABLE>
<TABLE class="PeiJianManageInputTable2">
<TR>
<TD>货架号</TD>
<TD>货架位数</TD>
<TD>货架层数</TD>
</TR>
<TR>
<TD><INPUT class="css_input" id="Text29" value='<%# DataBinder.Eval(Container.DataItem,"Mark")%>' type="text" name="txtTitle" runat="server"></TD>
<TD><INPUT class="css_input" id="Text30" value='<%# DataBinder.Eval(Container.DataItem,"Digit")%>' type="text" name="txtUnit" runat="server"></TD>
<TD><INPUT class="css_input" id="Text31" value='<%# DataBinder.Eval(Container.DataItem,"Floor")%>' type="text" name="txtAmount" runat="server"></TD>
</TR>
</TABLE>
<TABLE class="PeiJianManageInputTable3">
<TR>
<TD>存货量</TD>
<TD>出货量</TD>
<TD>总数量</TD>
</TR>
<TR>
<TD><INPUT class="css_input" id="Text32" value='<%# DataBinder.Eval(Container.DataItem,"Merchandise")%>' type="text" name="txtTitle" runat="server"></TD>
<TD><INPUT class="css_input" id="Text33" value='<%# DataBinder.Eval(Container.DataItem,"Shipment")%>' type="text" name="txtShipment" runat="server"></TD>
<TD><INPUT class="css_input" id="Text34" value='<%# DataBinder.Eval(Container.DataItem,"TotalAmount")%>' type="text" name="txtAmount" runat="server"></TD>
</TR>
</TABLE>
<TABLE class="PeiJianManageInputTable5">
<TR>
<TD class="PeiJianManageInputTable5Td1" height="10"></TD>
<TD class="PeiJianManageInputTable5Td2" align="right">
<asp:ImageButton id="Imagebutton13" onclick="onclick_updateinfo" runat="server" ImageUrl="/Images/ok-02.gif"
borderstyle="none" CommandName="update"></asp:ImageButton>
<asp:ImageButton id="Imagebutton14" onclick="onclick_canel" runat="server" ImageUrl="/Images/canel-01.gif"
borderstyle="none" CommandName="canel"></asp:ImageButton>
<SPAN onclick="return Confirm_Del();">
<asp:ImageButton id="Imagebutton15" onclick="onclick_deleteinfo" runat="server" ImageUrl="/Images/delete-01.gif" borderstyle="none" CommandName="delete"></asp:ImageButton>
</SPAN>
</TD>
</TR>
</TABLE>
</td>
</tr>
</table>
</itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
</asp:Panel>==================================================
.cs
//编辑数据
public void EditCommands(Object sender, DataGridCommandEventArgs e)
{
connectionstr();
int editID = (int) DataVisible2.DataKeys[e.Item.ItemIndex]; //更新数据
if (e.CommandName == "update")
{
// try
// {
// shbConn.Open();
// shbUpdateData="UPDATE PeiJianManage SET Title='" + txtTitle.Value
// + "',Provider='" + txtProvider.Value
// + "',PurchasePrice='" + txtPurchasePrice.Value
// + "',Price='" + txtPrice.Value
// + "',BuyDate='" + txtBuyDate.Value
// + "',TotalAmount='" + txtTotalAmount.Value
// + "',Mark='" + txtMark.Value
// + "',Digit='" + txtDigit.Value
// + "',Floor='" + txtFloor.Value
// + "'WHERE id=" + editID.ToString(); HtmlInputText txtTitle=(HtmlInputText)e.Item.FindControl("txtTitle");
HtmlInputText txtProvider=(HtmlInputText)e.Item.FindControl("txtProvider");
HtmlInputText txtPurchasePrice=(HtmlInputText)e.Item.FindControl("txtPurchasePrice");
HtmlInputText txtPrice=(HtmlInputText)e.Item.FindControl("txtPrice");
HtmlInputText txtBuyDate=(HtmlInputText)e.Item.FindControl("txtBuyDate");
HtmlInputText txtTotalAmount=(HtmlInputText)e.Item.FindControl("txtTotalAmount");
HtmlInputText txtMark=(HtmlInputText)e.Item.FindControl("txtMark");
HtmlInputText txtDigit=(HtmlInputText)e.Item.FindControl("txtDigit");
HtmlInputText txtShipment=(HtmlInputText)e.Item.FindControl("txtShipment");
HtmlInputText txtFloor=(HtmlInputText)e.Item.FindControl("txtFloor");
shbConn.Open();
// shbUpdateData="UPDATE PeiJianManage SET Title='" + txtTitle + "','" + Provider=txtProvider + "','" + PurchasePrice=txtPurchasePrice + "','" + Price=txtPrice + "','" + BuyDate=txtBuyDate + "','" + Mark=txtMark + "','" + Digit=txtDigit + "','" + Floor=txtFloor + "','" + Shipment=txtShipment + "','" + TotalAmount=txtTotalAmount + "' WHERE id=" + editID.ToString();
shbUpdateData="UPDATE PeiJianManage SET Title=txtTitle,Provider=txtProvider,PurchasePrice=txtPurchasePrice,Price=txtPrice,BuyDate=txtBuyDate,Mark=txtMark,Digit=txtDigit,Floor=txtFloor,Shipment=txtShipment,TotalAmount=txtTotalAmount WHERE id=" + editID.ToString(); shbComm=new OleDbCommand(shbUpdateData,shbConn);
shbComm.ExecuteNonQuery();
shbConn.Close();
connection4();
// }
// catch
// {
// }
}
至少一个参数没有被指定值。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.OleDb.OleDbException: 至少一个参数没有被指定值。源错误:
行 314:
行 315: shbComm=new OleDbCommand(shbUpdateData,shbConn);
行 316: shbComm.ExecuteNonQuery();
行 317: shbConn.Close();
行 318: connection4();
源文件: g:\wwwroot\dongfangqixiu\peijianmanage.ascx.cs 行: 316 堆栈跟踪:
[OleDbException (0x80040e10): 至少一个参数没有被指定值。]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) +41
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +174
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +92
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +65
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +112
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +67
DongFangQiXiu.PeiJianManage_ascx.EditCommands(Object sender, DataGridCommandEventArgs e) in g:\wwwroot\dongfangqixiu\peijianmanage.ascx.cs:316
System.Web.UI.WebControls.DataGrid.OnItemCommand(DataGridCommandEventArgs e) +110
System.Web.UI.WebControls.DataGrid.OnBubbleEvent(Object source, EventArgs e) +68
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.DataGridItem.OnBubbleEvent(Object source, EventArgs e) +101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +121
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +128
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
你看看这个语句
"UPDATE PeiJianManage SET Title='" + txtTitle + "','" + Provider=txtProvider + "','" + PurchasePrice=txtPurchasePrice + "','" + Price=txtPrice + "','" + BuyDate=txtBuyDate + "','" + Mark=txtMark + "','" + Digit=txtDigit + "','" + Floor=txtFloor + "','" + Shipment=txtShipment + "','" + TotalAmount=txtTotalAmount + "' WHERE id=" + editID.ToString();
你看看这个语句
"UPDATE PeiJianManage SET Title='" + txtTitle + "','" + Provider=txtProvider + "','" + PurchasePrice=txtPurchasePrice + "','" + Price=txtPrice + "','" + BuyDate=txtBuyDate + "','" + Mark=txtMark + "','" + Digit=txtDigit + "','" + Floor=txtFloor + "','" + Shipment=txtShipment + "','" + TotalAmount=txtTotalAmount + "' WHERE id=" + editID.ToString();===========================错在哪??????????
就是看蒙了才帖出来的啊
这样应该差不多了吧
标准表达式中数据类型不匹配。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.OleDb.OleDbException: 标准表达式中数据类型不匹配。源错误:
行 315: shbUpdateData = string.Format("update peijianmanage set title = '{0}' , provider = '{1}',purchaseprice = '{2}', price ='{3}',buydate = '{4}' , ='{5}' ,digit ='{6}',floor = '{7}' ,shipment ='{8}' ,totalamount ='{9}' where id = {10}",txtTitle ,txtProvider ,txtPurchasePrice ,txtPrice ,txtBuyDate ,txtMark ,txtDigit ,txtFloor ,txtShipment,txtTotalAmount ,editID.ToString());
行 316: shbComm=new OleDbCommand(shbUpdateData,shbConn);
行 317: shbComm.ExecuteNonQuery();
行 318: shbConn.Close();
行 319: connection4();
这样应该差不多了吧========================================================至少一个参数没有被指定值。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.OleDb.OleDbException: 至少一个参数没有被指定值。源错误:
行 290:
行 291:shbComm=new OleDbCommand(shbUpdateData,shbConn);
行 292: shbComm.ExecuteNonQuery();
行 293: shbConn.Close();
行 294: connection4();
源文件: g:\wwwroot\dongfangqixiu\peijianmanage.ascx.cs 行: 292
正在更新引用...
正在执行主编译...项目是最新的。
正在生成附属程序集...---------------------- 完成 --------------------- 生成: 1 已成功, 0 已失败, 0 已跳过===========成功是成功的,但在 IE 里是不行的!!!!
有时错误就是这么来的
string txtProvider = "2";
string txtPurchasePrice= "3";
string txtPrice = "4";
string txtBuyDate = "5";
string txtMark = "6"; string txtDigit = "7";
string txtFloor = "8";
string txtShipment = "9";
string txtTotalAmount = "10";
string editID = "11";
string st2="UPDATE PeiJianManage SET " ;
st2 = st2 + "Title = '" + txtTitle + "',";
st2 = st2 + "Provider='" + txtProvider + "',";
st2 = st2 + "PurchasePrice='" + txtPurchasePrice + "',";
st2 = st2 + "Price='" + txtPrice + "'," ;
st2 = st2 + "BuyDate='" + txtBuyDate + "',";
st2 = st2 + "Mark='" + txtMark + "',";
st2 = st2 + "Digit='" + txtDigit + "',";
st2 = st2 + "Floor='" + txtFloor + "',";
st2 = st2 + "Shipment='" + txtShipment + "',";
st2 = st2 + "TotalAmount='" + txtTotalAmount + "' ";
st2 = st2
+ "WHERE id='" + editID.ToString() + "'";
MessageBox.Show(st2);
你的id是string还是int?若是int,后面干吗还要tostring?
是string的话,就应该加''
shbUpdateData = string.Format("update peijianmanage set title = '{0}' , provider = '{1}',purchaseprice = '{2}', price ='{3}',buydate = '{4}' , ='{5}', digit ='{6}',floor = '{7}', shipment ='{8}' ,totalamount ='{9}' where id = {10} ",txtTitle ,txtProvider ,txtPurchasePrice ,txtPrice ,txtBuyDate ,txtMark ,txtDigit ,txtFloor ,txtShipment,txtTotalAmount ,editID.ToString())
--------------------------------------------------------id的类型参照楼上,如果是数字就不用管了,如果是字符要加 ''
你的这些是字符型 的还是控件类呀???
如果都是控件还都要加上
txtTitle.Text等等
shbUpdateData = string.Format("update peijianmanage set title = '{0}' , provider = '{1}',purchaseprice = '{2}', price ='{3}',buydate = '{4}' , ='{5}', digit ='{6}',floor = '{7}', shipment ='{8}' ,totalamount ='{9}' where id = {10} ",txtTitle ,txtProvider ,txtPurchasePrice ,txtPrice ,txtBuyDate ,txtMark ,txtDigit ,txtFloor ,txtShipment,txtTotalAmount ,editID.ToString())
--------------------------------------------------------id的类型参照楼上,如果是数字就不用管了,如果是字符要加 ''=============================================================标准表达式中数据类型不匹配。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.OleDb.OleDbException: 标准表达式中数据类型不匹配。源错误:
行 322:// shbUpdateData = string.Format("update peijianmanage set title = '{0}' , provider = '{1}',purchaseprice = '{2}', price ='{3}',buydate = '{4}' , ='{5}' ,digit ='{6}',floor = '{7}' ,shipment ='{8}' ,totalamount ='{9}' where id = {10}",txtTitle ,txtProvider ,txtPurchasePrice ,txtPrice ,txtBuyDate ,txtMark ,txtDigit ,txtFloor ,txtShipment,txtTotalAmount ,editID.ToString());
行 323: shbComm=new OleDbCommand(shbUpdateData,shbConn);
行 324: shbComm.ExecuteNonQuery();
行 325: shbConn.Close();
行 326: connection4();
源文件: g:\wwwroot\dongfangqixiu\peijianmanage.ascx.cs 行: 324 堆栈跟踪:
[OleDbException (0x80040e07): 标准表达式中数据类型不匹配。]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) +41
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +174
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +92
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +65
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +112
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +67
DongFangQiXiu.PeiJianManage_ascx.EditCommands(Object sender, DataGridCommandEventArgs e) in g:\wwwroot\dongfangqixiu\peijianmanage.ascx.cs:324
System.Web.UI.WebControls.DataGrid.OnItemCommand(DataGridCommandEventArgs e) +110
System.Web.UI.WebControls.DataGrid.OnBubbleEvent(Object source, EventArgs e) +68
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.DataGridItem.OnBubbleEvent(Object source, EventArgs e) +101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +121
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +128
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
还有,你贴这么多代码,你不累我拖都拖得累了 sss
txtTitle.Value 等等 是吗
那你都取text值试一下
txtTitle.Value 等等了出现:
======================================
标准表达式中数据类型不匹配。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Data.OleDb.OleDbException: 标准表达式中数据类型不匹配。源错误:
行 323: shbComm=new OleDbCommand(shbUpdateData,shbConn);
行 324: shbComm.ExecuteNonQuery();
行 325: shbConn.Close();
行 326: connection4();
源文件: g:\wwwroot\dongfangqixiu\peijianmanage.ascx.cs 行: 324
有没有加上
runat="server"
sql语句正确,数据库连接正确
这个从哪里来的?
怎么了????
这个从哪里来的?
===============================
public void EditCommands(Object sender, DataGridCommandEventArgs e)
{
connectionstr();
int editID = (int) DataVisible2.DataKeys[e.Item.ItemIndex];
是htmlInput 那种在服务端运行的,取Value
是web服务器取Text
————————————————————
天天数码 数码天天
http://www.ttdigital.mycool.net