For Programmers: Free Programming Magazines  


Home > Archive > ASP > December 2006 > Data Access via ASP









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Data Access via ASP
Punjabi Munda

2006-11-21, 6:55 pm

Hello alls , i am working on a interanet application for Inventory
handling,
i have a problem while submitting the data to server, please help me?
the problem goes like this
Data base : Ms-Access
Front End : ASP
The problem is how to comit the data "say Invoice" to main database is
two persons tries to make invoice at same time at different computers,
How to maintain the series of Invoice unaffected, how to allocat
Invoice number to them, and how to put a check that both of them can't
make a invoice of same customer at a same time at different computers
Please suggest
thanks
Deepak

Jon Paal

2006-11-23, 3:55 am

--give your invoice table a primary key field which is unique number.
--Make that primary key part of the invoice number.

This way, no two invoices will ever have the same number.


"Punjabi Munda" <deepak.karnal@gmail.com> wrote in message news:1164125016.941086.297510@b28g2000cwb.googlegroups.com...
> Hello alls , i am working on a interanet application for Inventory
> handling,
> i have a problem while submitting the data to server, please help me?
> the problem goes like this
> Data base : Ms-Access
> Front End : ASP
> The problem is how to comit the data "say Invoice" to main database is
> two persons tries to make invoice at same time at different computers,
> How to maintain the series of Invoice unaffected, how to allocat
> Invoice number to them, and how to put a check that both of them can't
> make a invoice of same customer at a same time at different computers
> Please suggest
> thanks
> Deepak
>



Deepak Sachdeva

2006-12-11, 6:57 pm

thanks for your reply but i know this solution , my main question i
think u don't understand, my main problem is if some one tries to make
a invoice from different computer at same time and one who starts
making it first rollback his data before saving it to server, now the
problem exsit that we are already allocate a invoice no. to the same
person, now how to handle this problem
please reply
deepak sachdeva

Jon Paal wrote:[color=darkred]
> --give your invoice table a primary key field which is unique number.
> --Make that primary key part of the invoice number.
>
> This way, no two invoices will ever have the same number.
>
>
> "Punjabi Munda" <deepak.karnal@gmail.com> wrote in message news:1164125016.941086.297510@b28g2000cwb.googlegroups.com...

Mike Brind

2006-12-11, 6:57 pm

Jon Paal answered your question correctly. That is how you maintain the
series of invoice numbers and ensure each invoice number is unique.

The question you really should be asking yourself is this: Why would you
allocate an invoice number before an invoice has been successfully created
in a database? Surely, until a user successfully commits their data, no
invoice exists.

--
Mike Brind

"Deepak Sachdeva" <deepak.karnal@gmail.com> wrote in message
news:1165686568.867730.123890@l12g2000cwl.googlegroups.com...
> thanks for your reply but i know this solution , my main question i
> think u don't understand, my main problem is if some one tries to make
> a invoice from different computer at same time and one who starts
> making it first rollback his data before saving it to server, now the
> problem exsit that we are already allocate a invoice no. to the same
> person, now how to handle this problem
> please reply
> deepak sachdeva
>
> Jon Paal wrote:
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com