the user can only see changes when he loads a page (containing the data from the record), or when a loaded page is refreshed.
permitting a user to login more then once, and letting those users modify your data, is something i would never consider. miltiple-logins for viewing data is fine, buth modifying ...
what you could do is : check against your database when they login, whether "this user" is already loged in, and report this to the user (all of them). for this you need:
- field in your database to register if user is logged in
- field on html-pages (all-pages, or use a frameset end puth it in one of the frames)
- a good (a verry good) system to monitor log-off's of the users (they won't all hit the "exit" button) look for more info about this on the asp forum
to signal changes, you need:
- field in your database for every record, where you store the time and user that last modifiŽd the record
- write a cookie to the users PC when he performs a databaseopperation, that contains the time and user-id he's loged in with (time must be exactly the same as in database, so has to be pulled from a variable on the page where you write the cookie and make the databaseconnection.)
- if another user searches for this data, the 'last modifying time and user' must be selcted + the cookie must be read. If their isn't a match between the two (or their isn't a cookie), then it was 'another user' that last modified that record, and you could signal this to this user.
to avoid that a database-operation is (tried to be) executed on a changed/'deleted' record:
- make a select for that record first and do the above (it's probalby whise not to delete the record, buth to use a variable that checks if the record is still active + clean them up after some time (or when all the users with that login have logged off)) If the record had been updated by another user, since the page was loaded (compairing the last modifying time, the cookie-time and the time when the page was loaded), you could reload the original page + show the changed data and signal that the changes were preformed by another user at a specified time.
example : you search for a product (select query) on page 1 (register time when recordset was returned in a session-variable (for asp) or something like that). show some data about the product on a form (page 2) in editable fields. when the user wants to submit page 2, first make a select for the product and check when it was last updated. if this was done by another user, and between the return of the recordset and the submit of page 2, signal this + show new data
with an autorefresh of the page 1 (and consequently refreshing page 2) you could create a more "up to date" situation, buth it would result in huge networktrafic.
what's causing your problems depends on the action your performing on the database.
about 2 : loading time can depend on a lot of things. the best way is control it is to avoid problems when programming an when choosing for products. avoid database-connection, reloading immages, cacch non-changing pages on your server etc etc