Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Access Data in Oracle From ASP Pages
What kind of error message are you getting? Also, are you using
Microsoft's ODBC for Oracle (I recommend) or Oracle's? Anyway, I think
your problem stems from specifying the cursor type. The ODBC to Oracle
doesn't seem to understand this. Try getting your recordset like this:
SET rstResults = connDB.Execute (sqlResults)
and forget about explicitly creating the recordset object.
Gil & Sue - 2NLuv2C wrote:
>
>
> Hi,
>
> I'm having trouble displaying the records in Oracle from ASP. This is
what
> it looks like:
>
> <html>
> <body>
> <%
> SET connDB = SERVER.CREATEOBJECT("ADODB.Connection")
> connDB.OPEN "CompanyDatabase"
> sqlResults = "SELECT EMPLOYEE_ID, EMPLOYEE_NAME FROM EMPLOYEES"
> SET rstResults = SERVER.CREATEOBJECT("ADODB.Recordset")
> rstResults.OPEN sqlResults, connDB, ADOPENSTATIC
>
> rstResults.MOVEFIRST
> DO UNTIL rstResults.EOF
> RESPONSE.WRITE rstResults("EMPLOYEE_ID") & " " &
> rstResults("COUNTY_NAME")
> rstResults.MOVENEXT
> LOOP
> %>
> </body>
> </html>
>
> ... and I already have an ODBC Driver set up.
>
> Tell me how to do it???
>
> Thanks.
>
>