Database Transaction and Session Management

Results 1 to 2 of 2

Thread: Database Transaction and Session Management

  1. #1
    Join Date
    Dec 1969

    Default Database Transaction and Session Management

    I&#039;m having a difficult time figuring out the best way to handle the following scenario:<BR><BR>1. User fills out a web form, then submits it.<BR>2. A record is inserted into a database table. The primary key value of this table is an artificial key (automatically increments for each new record).<BR>3. The primary key of the newly created record is returned to the web server, and is used to assign a value to a hidden form field on a second ASP page.<BR><BR>My question is a procedural one- what is the best way to handle the retrieval of the new primary key value? I thought about using a session token to track the transaction, but this seems fraught with problems (browsers set not to accept cookies, etc.). What is the best way to track a database transaction across multiple ASP pages?<BR><BR>I should also add that this customer is insisting on using a Microsoft Access file as their database, which of course has no inherent transactional capability.

  2. #2
    Join Date
    Dec 1969

    Default RE: Database Transaction and Session Management

    1. You can set a couple fields to manage the transaction process...<BR>Like 1 field can be a Bol field Yes/No if used (INSIDE ACCESS) True/False from asp/vbs... <BR>And when last stage is completed flag it yes...<BR>Also another field can be used to hold current DateTime, Now()<BR>As to when they started...<BR><BR>Then it&#039;s just a matter off any records that are older than 20 mins, 1 hour, 2 hours anything really.... that have not been completed.<BR>(that at least lets you clean up garbage)<BR><BR>Now you can go through the tedius task of passing things along in hidden form fields, and/or querystrings and rely on that<BR>Or you use cookies and or sessions....<BR><BR>(Yup, some have cookies and javascript disabled)...<BR><BR>Test for them before starting the transaction and if any of them are disabled...<BR>Send them to a page requesting them to enable them or to bugger off....<BR><BR>If you have something they want, or they want to complete the form/transaction(s)<BR>Then will gladly enable them...<BR>If not then you prolly dont want to be bothered with them anyways...<BR><BR>Just a broad idea to get you started.<BR>

Posting Permissions

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