Hello. I made a website where users log in to the system and add and update materials. I have a problem like this. When the system is very busy, when the user logs in with his name, he sees the data of another user. Although the session information is correct,
incorrect data comes from the dataset. I will be grateful if you could help me.
Unlike a Windows app, this is a single app used by multiple users and so static data are shared accross all users. Check or show your dataset declaration.
I have a problem like this. When the system is very busy, when the user logs in with his name, he sees the data of another user
According to your description, I can not reproduce your problem.
Can you show me how you query the data in the datasets? and you can try to clear your session and then re-run your project.
Best regards,
Sam
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
The red part below displays the Label1.Text? and what version of the database are you using?
Best regards,
Sam
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
The red information in the picture is the session information at the top. The red ring on the bottom is the part that should be the same as the top. I use sql server 2017 as database.
My problem is that when too many users enter the system, the data is confused. It is not normally a very common situation. So if we look at these things, shouldn't there be a constant problem?
For now it seems fine. Maybe in your context. You have generated those table adapters or you wrote them ? What if you search for "static" in your code to spot static data that shouldn't be shared accross all users.
Or maybe a logic issue. If I expect a single row, I prefer to use Single than First (so that it throws if not finding exactly one row rather than maybe not selecting always the same first row).
None
0 Points
4 Posts
Confusion of data in datasets
Jul 06, 2020 07:26 AM|muhammedfatih|LINK
Hello. I made a website where users log in to the system and add and update materials. I have a problem like this. When the system is very busy, when the user logs in with his name, he sees the data of another user. Although the session information is correct, incorrect data comes from the dataset. I will be grateful if you could help me.
Example image; https://hizliresim.com/7ym8oJ
All-Star
48570 Points
18086 Posts
Re: Confusion of data in datasets
Jul 06, 2020 08:10 AM|PatriceSc|LINK
Hi,
Most often it happens when using static data: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/static-classes-and-static-class-members
Unlike a Windows app, this is a single app used by multiple users and so static data are shared accross all users. Check or show your dataset declaration.
Contributor
3370 Points
1409 Posts
Re: Confusion of data in datasets
Jul 07, 2020 02:35 AM|samwu|LINK
Hi muhammedfatih,
According to your description, I can not reproduce your problem.
Can you show me how you query the data in the datasets? and you can try to clear your session and then re-run your project.
Best regards,
Sam
None
0 Points
4 Posts
Re: Confusion of data in datasets
Jul 07, 2020 08:38 AM|muhammedfatih|LINK
Contributor
3370 Points
1409 Posts
Re: Confusion of data in datasets
Jul 08, 2020 06:20 AM|samwu|LINK
Hi muhammedfatih,
Can you explain the place circled in red in your image?
The red part below displays the Label1.Text? and what version of the database are you using?
Best regards,
Sam
None
0 Points
4 Posts
Re: Confusion of data in datasets
Jul 08, 2020 07:18 AM|muhammedfatih|LINK
The red information in the picture is the session information at the top. The red ring on the bottom is the part that should be the same as the top. I use sql server 2017 as database.
None
0 Points
4 Posts
Re: Confusion of data in datasets
Jul 08, 2020 07:22 AM|muhammedfatih|LINK
My problem is that when too many users enter the system, the data is confused. It is not normally a very common situation. So if we look at these things, shouldn't there be a constant problem?
All-Star
48570 Points
18086 Posts
Re: Confusion of data in datasets
Jul 08, 2020 07:42 AM|PatriceSc|LINK
Hi,
For now it seems fine. Maybe in your context. You have generated those table adapters or you wrote them ? What if you search for "static" in your code to spot static data that shouldn't be shared accross all users.
Or maybe a logic issue. If I expect a single row, I prefer to use Single than First (so that it throws if not finding exactly one row rather than maybe not selecting always the same first row).