UpdateCmd="update student set Sno=@Sno,Sname=@Sname,Sbirth=@Sbirth Where Sno=@Sno"是不是有问题
解决方案 »
- 在web.config中加入httpModules后上传文件部份就出错,大家能帮忙看下是什么原因吗?附源码
- <input id="ceButton1" onclick="divoff()" />点击时没反应??
- 问题一个(菜鸟级)
- CheckBox 多选删除的问题?
- 了解Hashtable的进来!
- 如何用javascript创建一个带登录界面的模态对话框?在线等,解决立即给分.
- 请问:Response.Write方法与Page.RegisterStartupScript()方法有何区别?
- 谁能回答小弟三个问题,可以吗?我一直解决!!
- 点击添加安钮后,怎样把刚刚添加的内容立即显示出来?
- 在.net中如何调用.DLL及怎么把.VB编译成.DLL
- 請問各位高手,急啊,看一下我的代碼,在線啊
- 同一解决方案中一个项目的xml注释在另一个项目中不能智能显示?
===>
update student set Sname=@Sname,Sbirth=@Sbirth Where Sno=@Sno
update student set Sno=@newSno,Sname=@Sname,Sbirth=@Sbirth Where Sno=@oraSno
放在where子句里的parameter要设置SourceVersion = DataRowVersion.Original
要更新的那个值就用默认的就可以了
UComm=new SQLCommand(UpdateCmd,objConnection) UComm.Parameters.Add(New SqlParameter("@Sno", SqlDbType.VarChar))
UComm.Parameters.Add(New SqlParameter("@Sname", SqlDbType.VarChar))
UComm.Parameters.Add(New SqlParameter("@Sbirth", SqlDbType.VarChar))
UComm.Parameters.Add(New SqlParameter("@OldSno", SqlDbType.VarChar))
....
UComm.Parameters("@OldSno").Value = _
StuData.DataKeys(CInt(e.Item.ItemIndex))
....
myParm.SourceVersion = DataRowVersion.Original;MSDN上的例子
custDA?What's that?a SQLCommand?Thank all of you VERY MUCH!
I'll pay the points now!