asp 数据库关闭的问题
来源:百度知道 编辑:UC知道 时间:2024/06/23 03:59:13
执行update 关闭数据库 ,出现“关闭数据库错误”
是怎么回事?谢谢
<%
Dim zfy2
Set zfy2 = Server.CreateObject("ADODB.Recordset")
zfy2.ActiveConnection = MM_zfy_conn_STRING
zfy2.Source = "update zfy_car2 set psw2="&hits&" WHERE id = " + Replace(zfy1__MMColParam, "'", "''") + ""
zfy2.CursorType = 0
zfy2.CursorLocation = 2
zfy2.LockType = 1
zfy2.Open()
%>
....
<%
zfy2.Close()
Set zfy2 = Nothing
%>
是怎么回事?谢谢
<%
Dim zfy2
Set zfy2 = Server.CreateObject("ADODB.Recordset")
zfy2.ActiveConnection = MM_zfy_conn_STRING
zfy2.Source = "update zfy_car2 set psw2="&hits&" WHERE id = " + Replace(zfy1__MMColParam, "'", "''") + ""
zfy2.CursorType = 0
zfy2.CursorLocation = 2
zfy2.LockType = 1
zfy2.Open()
%>
....
<%
zfy2.Close()
Set zfy2 = Nothing
%>
Set rsSQL = Server.CreateObject("ADODB.Recordset")
strSQL = "update zfy_car2 set psw2="&hits&" WHERE id = " + Replace
rsSQL.open strSQL,conn,1,3
rsSQL.Close()
Set rsSQL=Nothing
你这样试试,没见过你这种写法