|
-
Feb 12th, 2001, 10:38 PM
#1
I originally posted this in the VB General Forum, but I thought I would also post it here, since this is the database hangout...
Hello everyone! This one, at least to me, is a little complicated. I want to have a Active Server Page website that access's a database (reads and writes to it). The website will taking and putting information in it all day long... Now, I also want to be able to have access to that very same database from my application on a desktop computer. I need to be able to update it from either the web, or the workstation. That's the first part....
The second part is, how would you go about preventing a user on the web and a user at a workstation putting in the same information to the database at the same time?
Example: Let's say that a person goes to the site for an appointment, the database retrieves all available appointments for a certain day and displays them. As the user picks the appointment he/she wants and inputs their information, another person on a workstation just took that appointment time. When the web user goes to push submit, that appointment will have been taken by the workstation, so then the user would be required to try again, and possibly again, until it goes through (thus really frustrating the user). I want to prevent that, how?
This is going to be a big enough project for me as it is, I need to start off on the right foot.
-
Feb 13th, 2001, 12:13 AM
#2
an easy one
create two variables..
1. the first variable stores the info as is from the server
2. the second variable stores the info changed at the
client
3. you then pull the initial data at the server again..and
compare it to the first variable...
if they ( 1 & 3 ) are the same.. you write your changed
data ( 2 ) into the server thus commiting the
transaction...
if they ( 1 & 3 ) are different ..your transaction fails
because someone else is using that data
build a class ( object ) to handle each of these jobs and
you will have the ability to make changes as needed
and they will be cohesive yet loosely coupled..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|