Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2008
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    getting session variable from autonumber

    I have an asp.net vb form that inserts a record into an Access Dbase. One of the fields is an autonumber field (ordernumber) that is generated in Access when the data is added to the dbase.

    My problem is this:
    I need to set a session variable equal to the ordernumber that is autogenerated right after the record has been added to the dbase.

    I originally thought about passing a form variable to a page that would retrieve the record and then grab the value for the ordernumber and set the session variable but I don't have any fields in the form that I could reliably use to differentiate each record. For example, I thought I could use the entered phone number but it is possible for the same phone number to be used for more than one record. Same is true for name, more than one order could come from the same person.

    Any suggestions?

  • #2
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Grab it after you do the insert statement, here is an example on msdn:
    http://support.microsoft.com/kb/815629

    Good luck

  • #3
    New Coder
    Join Date
    Feb 2008
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks for the direction.

    I'll have to dig through this a bit. I'm using Dreamweaver so these things end up being more of a challenge than I'd like it to be.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •