ADODB.Recordset 错误 '800a0bcd'
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/default4.asp,行10
程序是:
<%
If (IsEmpty(Session("ConnectionStringtovirtualtoasp")) OR Session("ConnectionStringtovirtualtoasp")=-1 OR Trim(Session("ConnectionStringtovirtualtoasp"))="" ) and (session("useridtoadmin")<>"1") Then
Set Conntemp=Server.CreateObject("ADODB.Connection")
Conntemp.open Application("ConnectionString")
Set rstemp=Server.CreateObject("ADODB.RecordSet")
dim sql
sql="select databaseIP,databasename,databaseuser,databasepwd from virtual where schoolname='school'"
rstemp.Open sql,conntemp,1,1
rstemp.MoveFirst
session("ConnectionStringtovirtualtoasp")=""'asp中链接数据库的字符串
session("ConnectionStringtovirtualtoasp")="driver={SQL SERVER};server="& rstemp("databaseIP") &";database="& rstemp("databasename") &";uid="& rstemp("databaseuser") &";pwd="& rstemp("databasepwd") &""
session("databaseIPtodotnet")=""'dotnet数据库IP
session("databaseIPtodotnet")=rstemp("databaseIP")
session("databasenametodotnet")=""'dotnet数据库名称
session("databasenametodotnet")=rstemp("databasename")
session("databaseusertodotnet")=""'dotnet数据库用户
session("databaseusertodotnet")=rstemp("databaseuser")
session("databasepwddotnet")=""'dotnet数据库用户密码
session("databasepwddotnet")=rstemp("databasepwd")
session("usertypetoadmin")="0"'标志是超级管理员
'session("ConnectionStringtovirtualtodotnet")="server="& rstemp("databaseIp") &";uid="& rstemp("databaseuser") &";pwd="& rstemp("databasepwd") &";database="& rstemp("databasename") &""
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
end if
%>