Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ASP query not returning current data
Did you do a commit after the insert in SQLPlus? If not (and I bet that's
the problem) your web page wouldn't see it until your session comits it.
SQLPlus is not autocommit;
Jim
"Rich D" <rdalfonso_at_nyc.rr.com> wrote in message
news:196cd325.0211102046.252da3fd_at_posting.google.com...
> I have an application written in ASP. I'm moving it over to Oracle.
> For some reason my queries don't return new data. I can run an insert
> query through SQL+. But when I try to retreive the data through server
> side code, I get nothing even though I know the data is there - 7
> records. This code returns zero records or if I try to out fields,
> nothing.
> Here some sample code.
>
> Set objConn = Server.CreateObject("ADODB.Connection")
> OpenNewConnection(objConn)
>
>
> set rs = Server.CreateObject("ADODB.Recordset")
> rs.CursorLocation = adUseClient
> rs.CursorType = adOpenStatic
> rs.LockType = adLockBatchOptimistic
>
>
> rs.Open "SELECT count(*) as cnt from survey_instance", objConn
>
>
> While Not rs.EOF
> response.write("cnt : " & rs("cnt") & "<br>")
> rs.MoveNext
> Wend
Received on Sun Nov 10 2002 - 22:52:30 CST