jdsflash
05-16-2006, 11:13 AM
Im attempting to build my first asp application. I cant seem to get past this first hump will someone point out what im doing wrong please.
Im getting this error:
ADODB.Recordset error '800a0e7d'
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/text.asp, line 10
<%@ Language=VBScript %>
<%
dim rstData2, strConnection2, cnData2, varSQL2, strRDir,strTemp Set cnData2 = Server.CreateObject("ADODB.Connection")
strConnection2 = "Driver={SQL Server}; server=wisconline;Database=RegFlex; UID=josh; PWD=flexo"
cnData2.Open strConnection2
DIM cn, rs, LoopCount
Set rstData2 = Server.CreateObject("ADODB.Recordset")
varSQL2 = "SELECT * FROM regflexo"
rstData2.Open varSQL2
LoopCount = 1
If rstData2.EOF Then
Write("something")
Else
Write("<table border=0 width='100%' cellpadding=2 cellspacing=1 bgcolor=white>")
Response.Write("<ol>")
Do While Not rstData2.EOF ' Loop starts until end of recordset
LoopCount = LoopCount + 1
Response.Write("<li>" & rstData2("column1").Value & "<br>")
rstData2.MoveNext
Loop
Response.Write("</ol>")
End If
rstData2.Close
Set rstData2 = Nothing
cnData2.Close
Set cnData2 = Nothing
%>
Im getting this error:
ADODB.Recordset error '800a0e7d'
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
/text.asp, line 10
<%@ Language=VBScript %>
<%
dim rstData2, strConnection2, cnData2, varSQL2, strRDir,strTemp Set cnData2 = Server.CreateObject("ADODB.Connection")
strConnection2 = "Driver={SQL Server}; server=wisconline;Database=RegFlex; UID=josh; PWD=flexo"
cnData2.Open strConnection2
DIM cn, rs, LoopCount
Set rstData2 = Server.CreateObject("ADODB.Recordset")
varSQL2 = "SELECT * FROM regflexo"
rstData2.Open varSQL2
LoopCount = 1
If rstData2.EOF Then
Write("something")
Else
Write("<table border=0 width='100%' cellpadding=2 cellspacing=1 bgcolor=white>")
Response.Write("<ol>")
Do While Not rstData2.EOF ' Loop starts until end of recordset
LoopCount = LoopCount + 1
Response.Write("<li>" & rstData2("column1").Value & "<br>")
rstData2.MoveNext
Loop
Response.Write("</ol>")
End If
rstData2.Close
Set rstData2 = Nothing
cnData2.Close
Set cnData2 = Nothing
%>