| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: "View" to a large schema
Karsten Farrell <kfarrell_at_belgariad.com> wrote in message news:<MPG.1978d39f9c07107f9897ed_at_news.la.sbcglobal.net>...
<snipped for brevity>
> Again, without the code in front of me, I'm just taking a shot in the
> dark. Since it seems to work with a FOR loop, but not a DO-UNTIL loop,
> it's beginning to sound like you are trying to open a connection AFTER
> you've already reached the rs.EOF. Do you see anywhere that you close
> the connection? If the code already detects an EOF when it comes to the
> DO-UNTIL statement, then the DO won't get executed and you'll have an
> empty RS. The FOR would execute, however, because it loops a specific
> number of times.
>
> I'm not an ASP expert (we use the similar JSP), so I hope someone else
> will jump in here.
Hi all,
I'm posting the code, now that I kind of understand what's going on. For a quick recap, I've found that if I put in a for loop instead of the do while not loop then I can iterate up to 1000 times and the page doesn't freeze up. However, if I use the do loop, it just freezes. A couple of things I don't understand that I hope you can help me with.....
Thanks in advance for any help you can give me.
Function listTablesWeb(nDSN)
dim objConn, objTableRS, objNoneSupportedTableRS
dim bFound, aNoneSupportedTablesArray, sTempText
dim nCounter
Response.Write "<br>" & nDSN
on error resume next
Set objConn = Server.CreateObject("ADODB.Connection")
'objConn.open nDSN
objConn.Open sDSN, sUsername, sPassword', sDriveOptions
If Err.Number <> 0 Then
localError = Err.Description
else
sTempText = ""
on error resume next
set objTableRS = objConn.OpenSchema(adSchemaTables)
objTableRS.movelast
response.write("<option>We are BOF</option>")
end if
if objTables.EOF then
response.write("<option>We are EOF</option>") end if
' Do While Not objTableRS.EOF
' If LCase(objTableRS("TABLE_TYPE").Value) = LCase("TABLE") or
LCase(objTableRS("TABLE_TYPE").value) = LCase("VIEW") Then
' Response.Write("<option value='" &
' End If ' objTableRS.MoveNext ' Loop objTableRS.Close objConn.Close end if Set objTableRS = Nothing Set objConn = Nothing
![]() |
![]() |