I have a asp.net webmethod which is static and it will do delete operation of user's files in the DB. The file_name is sent through jQuery as input. But the for DB connection, I need to use a static DBconnection object.
When multiple users delete their own file from UI, the jQuery will hit the same static method, which uses a single Static connection object. So multiple requests arise at the same time, will this delete only the last(latest request) users file is deleted from the DB? If so how to handle this with jquery-ajax in asp.net.
Please throw some light if i stated something wrong.
[Updated] Server side code:
public static void DeleteAttachment(int fileId, string fileLoc)
{
SqlDBAccess objDBAccessStat = new SqlDBAccess();
.......
}