[thelist] ASP/TSQL/UID

Les Lytollis les.lytollis at morse.com
Wed Oct 2 11:32:34 CDT 2002


>From my dim and distant ASP days, I seem to remember you need to

objRs.MoveFirst before you check for BOF and EOF (I actually used to do MoveLast, MoveFirst, but I don't think that's required)

Cheers
Lez


>
> I am having a peculiar problem executing some SQL through an
> ASP script.
> The statement is:
>
> strSQL = "SELECT agendasinfo_text, agendasinfo_isheading FROM
> agendasinfo WHERE agendasinfo_agenda_id = '" &
> Request.QueryString("id")
> & "'"
>
> Response.Write this to a web page, and I have:
>
> SELECT agendasinfo_text, agendasinfo_isheading FROM agendasinfo WHERE
> agendasinfo_agenda_id = '{1A2B6434-F383-4F18-A25D-C5F2FBBCB433}'
>
> Copy this and paste to Query Analyser and I get the expected (and
> required) output. However, run it from the ASP script...
>
> If Not objRS.BOF And objRS.EOF Then
> 	While Not objRS.EOF
> 		...
> 	Wend
> End If
>
> ...and it doesn't make it past the initial condition, as the recordset
> contains no data. From what I've said, am I making a stupid
> error, or is
> there more to it?




More information about the thelist mailing list