Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: ASP query not returning current data

Re: ASP query not returning current data

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Mon, 11 Nov 2002 04:52:30 GMT
Message-ID: <iIGz9.2070$285.4382@rwcrnsc51.ops.asp.att.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US