Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

are session variable id's unique?

Status
Not open for further replies.

Shilohcity

Technical User
Jul 12, 2000
136
GB
Well I guess my title here explains my query. I am wanting to use a session id as a unique identifier in a table. Is this possible or recommended?

If it is not suitable I am planning on entering info in a table which will occupy more than one row (different items from a cart) and using the autonumber field of the first item as the unique order number something like this:

RS.Open orderinfo, objConn, adOpenKeySet, adLockOptimistic, adCmdTable
RS.AddNew
RS("itemid") = Request(“itemid”)
RS("quantity") = Request(“quantity”)
RS("sessionid") = Request(“sessionid”)
RS.Update
orderid = RS("autonumber")

this would get me the number but the first item added would still have an empty orderid column so..

Set objRS = Nothing
Sql = SELECT * FROM orderinfo WHERE orderid = ("&orderid&")
rs.open sql
Rs(“orderid”) = orderid

and then pass the orderid to a hidden field and on we go..


Any feedback very welcome

Justin. X-) "Creativity is the ability to introduce order into the randomness of nature." Eric Hoffer

Visit me at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top