Last post Nov 10, 2016 03:02 AM by Zhi Lv - MSFT
Nov 09, 2016 01:22 PM|sencsk|LINK
I'm building web application using
sql server and asp.net with linq. i got some record shuffling in one table at randomly and different time maybe the issue occur 4 or 5 months once.
my app is used by too many countries so its having concurrent users accessing the system. I'm having My App server and DB Server in the same location.
As per my analysis and doubts,
1. I fully checked the code level . its having so many logic's but all are working fine by code level of reviews and validation. my question is if the logic is missing or value not properly getting or setting then then the error occur daily. but
i'm getting 4 or 5 months only.
2. im using saving 2 tables at a time. one is parent another one is child. i'm trying to get the inserted id from parent use with scope_identity() and with reference im saving the id with child table.
3. Really i don't know what are the ways to do data shuffling. out of the box i thinked but i really don't get any idea to identify even i don't see any road map on it. where the issue occur? why?
its based on session or sql server pool or application pool or .....
Nov 09, 2016 09:05 PM|PatriceSc|LINK
What is the exact behavior you see ? I'm not sure if you meant that you have rows that are not shown in the correct order or maybe something such as using a wrong parent id for a child row. It would allow to better understand where you should look at (in
the first case double check your ordering criteria, note that without an explicit ORDER you have no guarantee about the order). In the later case more likely you are not handling your SCOPE_IDENTITY() value correctly (do you do only on the server, do you retrieve
it on the web server before using it again, do you store that in a static member).
We would need first to understand which kind of "shuffle" you are seeing EXACTLY.
Nov 10, 2016 03:02 AM|Zhi Lv - MSFT|LINK
Welcome to asp.net forum.
From your description, I'm not very clear about your problem, could you please explain more details about that? What do you mean about the data shuffling, ordering or grouping?
What is the exact behavior you meet? Not get the correct data from a date range? If you can provide some of your own ideas or attempts that you may have made so far, it might be easier for us to guide you and help you get what you need.