错误描述:
如图:我单击更新,完全没反应,文本框还是文本框,文本框里的内容没变,帮忙看看,先谢谢了,
应该是更新记录的代码出错了:
__________________________________________________________
sub mydatalist_update(sender as object,e as datalistcommandeventargs)
dim conn as new oledbconnection("provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("database/wwwlink.mdb"))
dim texsitename,texurl,texgrade,texintro as textbox
texsitename=e.item.findcontrol("sitename")
texurl=e.item.findcontrol("url")
texgrade=e.item.findcontrol("grade")
texintro=e.item.findcontrol("intro")
dim sql as string
sql="update link set sitename='" & texsitename.text & "',url='" & texurl.text & "',grade=" & cint(texgrade.text) & " ,intro='" & texintro.text & "' where sitename='" & mydatalist.datakeys(e.item.itemindex) & "'"
dim cmd as new oledbcommand(sql,conn)
conn.open()
cmd.executenonquery()
conn.close()
mydatalist.edititemindex=-1
call binddata()