Data loss

iansilv

Limp Gawd
Joined
Jun 10, 2004
Messages
335
Alright, I have a general problem happening on my site and I need some advice or suggestions. i can't seem to get my programmer to figure out what the issue is, and I suspect is is because we cannot duplicate the problem as we are not in the multi-user environment that my users are during the day.

My website is a software as a webservice program that manages business in an office. Each user has an individual account that they log in to, and files are shared as records in the system amongst multiple users. Multiple people can be working on the same file at once.

I am running Microsoft SQL and Windows Server 2K3.

Here is what is happening:

Data is being overwritten from one record to the next. A new record will be input, and it will take the data from the previously accessed record and merge with it. Sometimes, one user is just using the site and they click on a client name, and a record with a changed name appears in its place.

I am looking for any and all suggestions on how to troubleshoot this, or if there are common problems when something is not programmed in the correct way leading to records being overwritten in a MS SQL and Windows 2K3 server environment. My programmer can't seem to find the cause, so I am hoping I can get some feedback to help him.

Thank you.
 

maw

Supreme [H]ardness
Joined
Sep 27, 2000
Messages
4,134
I kind of vaguely follow, so I'm not sure if my suggestions would help, but when I've had weird data overwriting stuff in the past, it was often because of one of the following

- I forgot to add an auto-incrementing key to a table
- i'm running an update query on the wrong record or at the wrong time
- i forgot to add a WHERE clause to an update query, or used the wrong value in the where clause
- i was inserting a new record where i should have been updating an existing one, or vice-versa
 

iansilv

Limp Gawd
Joined
Jun 10, 2004
Messages
335
OK- those are things to look at for sure- I will take up each of these issues with my programmer. It is so weird- we cant exactly duplicate the problems yet, but your suggestions will help.

Anything else I should check out?
 

Tytalus

Supreme [H]ardness
Joined
Nov 1, 2006
Messages
4,257
You aren't doing something based on the IP address of the machine that sent you the information to update, are you? If they are behind a NAT they'd likely all show up as the same IP address, which could lead to some broken logic that would write the same record twice.... of course this is all depending on implementation.

2.png
 

iansilv

Limp Gawd
Joined
Jun 10, 2004
Messages
335
Actually, yes I am- I have a system setup that restricts logins to a particular ip address, so the user is restricted from logging in unless they are in the physical office. Could that cause the problem?
 
Top