Results 1 to 2 of 2

Thread: Advice to generate a sequence number from VB

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Answers
    1

    Advice to generate a sequence number from VB

    I have developed a project using VB as front end and oracle as back end where i have to generate a number sequentially. For this i created a sequence in oracle but when i generate a number from this sequence using vb code i am not getting the numbers generated sequentially i.e., either i am getting an even or an odd number. sometimes the sequence is jumping for example after 10 it is either 12 or 22. when i am checking this using SQL plus i.e., from oracle i am getting the sequence perfectly.i have checked my vb code whether the sequence is being called repeatedly but i dont find such thing. i dont know why my sequence which is generating properly from oracle but not giving correct results when it is being called from vb code.

    Please give me solution for this or an advice to generate a sequence number from vb


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Advice to generate a sequence number from VB

    that might happen because of multiple users accessing the same sequence from different sessions. To avoid this u need to specify ORDER in the sequence defination.

    If you need to do the same from front end then select the last value that is inserted / already used and increment the same by the value u want.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact