怎样提交表单到.asp中在存入Access数据库呢?
展开全部
现在在表单的action中写要发到那地方比如(action="count.asp"就是发到count.asp文件中),在count.asp接受它发来的值(比如前面有的name的文字域发来值就用aa=request.Form("name"),(aa是新变量)),让后就写入数据库比如把值写到name表的name字段:
Dim rs_update
Dim rs_update_numRows
Set rs_update = Server.CreateObject("ADODB.Recordset")
rs_update.ActiveConnection = MM_conn_STRING
rs_update.Source = "SELECT * FROM name"
rs_update.CursorType = 0
rs_update.CursorLocation = 2
rs_update.LockType = 3
rs_update.Open()
rs_update_numRows = 0
rs_update.addnew
rs_update("name")=aa
rs_update.update
Dim rs_update
Dim rs_update_numRows
Set rs_update = Server.CreateObject("ADODB.Recordset")
rs_update.ActiveConnection = MM_conn_STRING
rs_update.Source = "SELECT * FROM name"
rs_update.CursorType = 0
rs_update.CursorLocation = 2
rs_update.LockType = 3
rs_update.Open()
rs_update_numRows = 0
rs_update.addnew
rs_update("name")=aa
rs_update.update
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |