一直报错,至少一个参数没有被指值表:
id 自动编号
time1 时间
time2 时间
u_id 文本
P_ID 文本
used 是/否我在前台insert,没有问题, 在后台用update的时候int intSelectIndex = DGShow.SelectedIndex;string strPostId = DGShow.Items[intSelectIndex].Cells[1].Text;
string strPostCom = "update T_GetPrize set [G_Used]=Yes,[G_PostTime]=Now()";
strPostCom += " where G_ID = " + strPostId;执行就出错..请大虾帮忙..列:
update Table set [Used]=Yes,[Time2]= '1900-10-10 10:01:01' where ID = 6;
id 自动编号
time1 时间
time2 时间
u_id 文本
P_ID 文本
used 是/否我在前台insert,没有问题, 在后台用update的时候int intSelectIndex = DGShow.SelectedIndex;string strPostId = DGShow.Items[intSelectIndex].Cells[1].Text;
string strPostCom = "update T_GetPrize set [G_Used]=Yes,[G_PostTime]=Now()";
strPostCom += " where G_ID = " + strPostId;执行就出错..请大虾帮忙..列:
update Table set [Used]=Yes,[Time2]= '1900-10-10 10:01:01' where ID = 6;
解决方案 »
- webconfig 连接字符串加密和解密
- 怎么样在后台取gridview表头控件?
- 在应用程序级别之外使用注册为 allowDefinition='MachineToApplication' 的节是错误的。如果在 IIS 中没有将虚拟目录配置为应用程序,则可能导致此错误。
- 我狂晕啊。我专家分怎么会减少啊
- 软件行业发展的趋势,以后会不会稍大的公司都为自己配一支软件研发团队?
- aspx.动态生成image控件个数
- [馨郁星愿]问一个让大家激动滴技术问题:)
- 在线等待!TreeView 横排显示,能否转换成树形结构显示
- 属性“state”不是元素“div”的有效属性,该怎么办。
- 在新增了一个ASP.NET 后,在工具箱中有”WEB窗体“和HTML二个选项,不知道有什区别
- DataList里的客户端控件响应脚本的问题
- 关于线程????
试试
*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) 最新版本:20070127http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
string strPostId = DGShow.Items[intSelectIndex].Cells[1].Text;
string strPostCom = "update T_GetPrize set [G_Used]=Yes,[G_PostTime]=Now()";//这有错
strPostCom += " where G_ID = " + strPostId;应该是:
string strPostCom = "update T_GetPrize set [G_Used]=Yes,[G_PostTime]='" + Now() + "'";