一直报错,至少一个参数没有被指值表:
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;

解决方案 »

  1.   

    update Table set [Used]=1,[Time2]= '1900-10-10 10:01:01' where ID = 6;
      

  2.   

    update [Table] set [Used]=Yes,[Time2]= '1900-10-10 10:01:01' where [ID] = 6;
    试试
      

  3.   

    update Table set [Used]=-1,[Time2]= '1900-10-10 10:01:01' where ID = 6;
      
    *****************************************************************************
    欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) 最新版本:20070127http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
      

  4.   

    update Table set [Used]='Yes',[Time2]= '1900-10-10 10:01:01' where ID = 6;
      

  5.   

    出错信息是啥??你在access中的命令方式运行一下试试
      

  6.   

    你时间是datatime吗??如果是请把1900调大些,调到1753 年 1 月 1 日之后
      

  7.   

    update from Table set [Used]=Yes,[Time2]= '1900-10-10 10:01:01' where ID = 6;加个from试试...记的ACCESS必须有这个from..忘了是UPDATE必须有了..还是DELETE
      

  8.   

    update [Table] set [Used]=Yes,[Time2]= '1900-10-10 10:01:01' where ID = 6;这个语句是没错的,要是有错,找其他地方的错吧!
      

  9.   

    datetime (datetime 数据类型:在 Access 项目中,日期和时间的数据类型,范围从 1753 年 1 月 1 日到 9999 年 12 月 31 日,精确度为三百分之一秒,即 3.33 毫秒。)
      

  10.   

    smalldatetime (smalldatetime 数据类型:Access 项目中的一种日期和时间数据类型,精度不如 datetime 时间数据类型。数据取值范围从 1900 年 1 月 1 日到 2079 年 6 月 6 日,精确度为一分钟。)
      

  11.   

    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;应该是:
    string strPostCom = "update T_GetPrize set [G_Used]=Yes,[G_PostTime]='" + Now() + "'";