If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > DB CONCURRENT ACCESS ISSUE IN ASP.net

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-22-09, 15:02
reachb4 reachb4 is offline
Registered User
 
Join Date: Nov 2008
Posts: 2
DB CONCURRENT ACCESS ISSUE IN ASP.net

Hi,
I have a website in which i sell PIN numbers of telephone cards.
Telephone cards will be added to the shopping cart by the user. After payment he will be emailed the PIN number of the card he bought

I need to solve two issues
1) How to make sure that a unsold product is in the database after payment. example: suppose there is only 1 product in the database. Two users selected the product. Two of them made the payment. But only one will get the product (What i can do here?)

2) How i can block access to a record in the database when other process is using it? Suppose 2 users bought a card , how can i prevent issuing same PIN to two different users?

I AM USING SQL SERVER 2005 with ASP.net

Please help.
Thanks in advance.


Regards,
John.
Reply With Quote
  #2 (permalink)  
Old 04-27-09, 00:11
myle myle is offline
(Making Your Life Easy)
 
Join Date: Feb 2004
Location: New Zealand
Posts: 1,142
my understand is

I would look at

In the Product table put Flag Sold in the Feild.


I think you mike have to have a PIN Table

PINID
ProductID
PinCODE
UserID

then when a Pin number is sold it get add the the PINtable along with the USERID
__________________
hope this help

See clear as mud


StePhan McKillen
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment:
Access based on my own environment: DAO3.6/A97/A2000/A2003
VB based on my own environment: vb6 sp5
ASP based on my own environment: 5.6
VB-NET based on my own environment started 2007
SQL-2005 based on my own environment started 2008
MYLE
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On