Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Supporting Technologies > Server-Side Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-11-2003, 11:16 AM   #1
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default losing autonumbers in Access

Hi all


I recently did a commerce site, and its fairly straight fwd. From swf i post to an asp page, which in turn communicates with a dll bla bla bla.

my problem is that, every now and again i lose an autonumber in my table that contains the orders. for example they will go from 112, 113, 115. and the order is not missing since i pick it up during testing, and know that i did not olose an order.

this is severly disconcerting however as can be imagined.

any ideas
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 03-11-2003, 02:44 PM   #2
jaybee
Senior Citizen
 
jaybee's Avatar
 
Join Date: Feb 2003
Location: underneath the arches
Posts: 443
Default

you're using access on a commerce site? good luck with that let's hope their product is an unpopular one cos if not your site will be in trouble .....

re yr prob, from what I remember I think autonumbers only claim to be unique not strictly sequential - does this matter?
jaybee is offline   Reply With Quote
Old 03-11-2003, 02:59 PM   #3
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

all that is needed.

that is the problem. the klient just logs their requests in it, and wish the id to serve as their consequential OrderId.

thnx
__________________
oi poloi
http://www.memorphic.com/news/

Last edited by hangalot; 03-11-2003 at 03:02 PM.
hangalot is offline   Reply With Quote
Old 03-11-2003, 03:06 PM   #4
jaybee
Senior Citizen
 
jaybee's Avatar
 
Join Date: Feb 2003
Location: underneath the arches
Posts: 443
Default

you could generate the ID yrself using a maxID type setup...I don't use asp but in pseudocode:

Code:
[transaction]

[query]
SELECT max(ID) as maxID
FROM table
[/query]

[query]
INSERT INTO table VALUES(maxID+1,column1, column2)
[/query]

[/transaction]
jaybee is offline   Reply With Quote
Old 03-11-2003, 03:14 PM   #5
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

is busy doing.
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Old 03-11-2003, 03:19 PM   #6
jaybee
Senior Citizen
 
jaybee's Avatar
 
Join Date: Feb 2003
Location: underneath the arches
Posts: 443
Default

huh?
jaybee is offline   Reply With Quote
Old 03-11-2003, 03:25 PM   #7
freddycodes
Master of Nothing
 
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
Default

First off like jaybee said Access is not a database that should be used for an ecommerce site. Secondly an auto-incrementing column should not be used to keep track of orders. It should only be used as a key to uniquely identify a row in the table and that is it. If you need a sequential number you should do as jaybee stated and store a sequence in another table, where you increment that number everytime an order is placed. But since Access doesn't do table locking and that sort of stuff, hopefully more than one person doesn't order at the same time.
freddycodes is offline   Reply With Quote
Old 03-11-2003, 03:33 PM   #8
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,858
Default

really u guys r thinking 2 big. this is an inhouse commerce site 2 order our stationary from a printer, and 2 keep log of these orders and against what cost center it is allocated. no ssl, no transaction, nice simple log to ease a previous administrative irritation
__________________
oi poloi
http://www.memorphic.com/news/
hangalot is offline   Reply With Quote
Reply


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:56 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.