Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

c# application with simultaneous users, inconsistent data return

Status
Not open for further replies.

scotitpulsa

IS-IT--Management
Oct 1, 2003
61
0
0
US
I have a c# app that hits a mysql database. Basically multiple users at any time can make a wide range of selections on a front end page, then based on the selections a query in a session variable is created. After selections are finished, they click go, and the query that was built based on the selections executes to the DB and results are returned. My problem is this:

When two or more users are using the app, if user 1 makes a selection, then immediately user 2 makes a selection, and user 1 clicks "GO", user 1 will get user 2's selection? Any idea on how to prevent this?
 
The only way of I can think when that could happen, is when you are using application variables to store the users selections or data (or perhaps a Shared variable). Without any more information, that's the best guess I can come up with.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I'm using session variables to capture and hold the selections that a user makes if that helps?...The post backs on the front end page are fine, but when the page posts back one final time after the go button is clicked, for some reason the query that was built by the last user that made a selection is executed....
 
As ca8msm has said, there is no way this could happen unless you are using application or shared variabels. Session variables are specific to the sessioin(user). Maybe you can post some code for us to look at.

Jim
 
You'll have to post the code that you are using to connect and to the database and execute the query as that is not possible with session variables...


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I worked it out....It was actually rolling through to the other session variables because they were getting set after another method was being run. My mistake. Thanks for the help though!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top