Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 9th, 2003, 11:49 AM
stcoder stcoder is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: reno
Posts: 18 stcoder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Not possible but true

I have a page where I use VB script to get three numbers from an Oracle sequence generator. The script runs correctly the first time the page is opened, getting three new numbers each time. If, however, I open the page again within the same session, the code appears to run again, but returns the same three numbers.

This should be impossible. I throw the numbers into recordsets which I set to nothing once I move to another page. There should be no residual values in the page. Could Oracle be giving the same three values to the select statements? How could that be possible?

'Get new identification numbers

dim permitnumber, permitdetail, appnewnumber



if Request.Form("category").Count=0 then


with rsPermitNumber
.Source = "SELECT SEQ_ENCROACHMENTS.NEXTVAL FROM DUAL"
'.ActiveConnection = objConnection
end with

rsPermitNumber.Open()

permitnumber = rsPermitNumber(0)
Response.Write("VBPermit=" &rsPermitNumber(0))

rsPermitNumber.Close()


with rsPermitDetail
.Source = "SELECT SEQ_ENCROACHMENTS.NEXTVAL FROM DUAL"
'.ActiveConnection = objConnection
end with

rsPermitDetail.Open()

permitdetail = rsPermitDetail(0)
Response.Write("VBDetail=" &rsPermitDetail(0))

rsPermitDetail.Close()

with rsApplicantNew
.Source = "SELECT SEQ_ENCROACHMENTS.NEXTVAL FROM DUAL"
.ActiveConnection = objConnection
end with

rsApplicantNew.Open()

appnewnumber = rsApplicantNew(0)

rsApplicantNew.Close()
Response.Write("SEQ VB Fired")
set rsPermitNumber = nothing
set rsPermitDetail = nothing
set rsApplicantNew = nothing

'There's some javascript in here to fill the values in the page

Else

End if

Thanks to anyone who can help ease this pain!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Not possible but true


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway