From: shank on
>>on error resume next<<
Again, you are correct. I have it inside an include file and ignored the
possibility of its presence.
sorry!

"Bob Barrows [MVP]" <reb01501(a)NOyahoo.SPAMcom> wrote in message
news:OpQc6hUhIHA.4396(a)TK2MSFTNGP04.phx.gbl...
> Then you must have had "on error resume next" masking the error.
>
> shank wrote:
>> There was no error. Just an empty screen.
>> thanks
>>
>> "Bob Barrows [MVP]" <reb01501(a)NOyahoo.SPAMcom> wrote in message
>> news:%23HjJuBUhIHA.1208(a)TK2MSFTNGP03.phx.gbl...
>>> shank wrote:
>>>>>> Response.Write(arrResultSet(1,iCounter) & "")<<
>>>> That was the problem,
>>>> Should have been...
>>>> Response.Write(arrResultSet(0,iCounter) & "")
>>>
>>>
>>> And, fo future reference, if you had provided an error message and
>>> indicated which line threw the error, it would have been a much
>>> simpler diagnosis.
>>> --
>>> Microsoft MVP -- ASP/ASP.NET
>>> Please reply to the newsgroup. The email account listed in my From
>>> header is my spam trap, so I don't check it very often. You will get
>>> a quicker response by posting to the newsgroup.
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>


From: Bob Barrows [MVP] on
daddywhite wrote:
>> Well, isn't that what I just did? You want me to do it again? :-)
>
> Just thought it would be handy to see your interpretation of best
> practice for the code all as one chunk thats all.
>
> regards

OK ..

<%
dim cn, rs, arData, i
set cn=createobject("adodb.connection")
on error resume next
cn.open connectstring
if err<>0 then
'handle the error - notify user, destroy cn object
on error goto 0
else
Set rs = CreateObject("ADODB.Recordset")
cn.stp_Manuf rs
if err<> 0 then
'handle the error - notify user, close&destroy cn object
on error goto 0
else
on error goto 0
if not rs.eof then arData = rs.GetRows
rs.close: set rs=nothing
cn.close: set cn=nothing
if IsArray(arData) then
for i = 0 to ubound(arData,2)
Response.Write arData(0,i) & "<br>"
next
else
Response.Write "No records returned"
end if
end if
end if
%>

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.