Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Some fields randomly not updated in INSERT and UPDATE

 
   Database Help (Home) -> Server RSS
Next:  How to recover if just .ldf is lost?  
Author Message
Don Akin

External


Since: Feb 22, 2005
Posts: 1



(Msg. 1) Posted: Tue Feb 22, 2005 8:52 pm
Post subject: Some fields randomly not updated in INSERT and UPDATE
Archived from groups: microsoft>public>sqlserver>server (more info?)

I use an INSERT statement in a C# program to add a row to a table that has
about 50 fields. About 1 in 10 times, not all the fields get inserted into
the new row. The fields that do not get inserted correctly are always one of
the same 5 or 6 fields. I have 30 clients using this program. The same thing
is happening in each client's database. I can insert the same row 10 times,
and only once or twice will it not insert correctly. Blanks get inserted
into the same 5 or 6 fields.

I have tried doing a SELECT after the INSERT to see if the fields got filled
in correctly, then, if the field is blank I try to do an UPDATE to correct
the blank fields. This does not seem to work either.

 >> Stay informed about: Some fields randomly not updated in INSERT and UPDATE 
Back to top
Login to vote
David Gugick

External


Since: Sep 21, 2004
Posts: 118



(Msg. 2) Posted: Wed Feb 23, 2005 12:40 am
Post subject: Re: Some fields randomly not updated in INSERT and UPDATE [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Don Akin wrote:
 > I use an INSERT statement in a C# program to add a row to a table
 > that has about 50 fields. About 1 in 10 times, not all the fields get
 > inserted into the new row. The fields that do not get inserted
 > correctly are always one of the same 5 or 6 fields. I have 30 clients
 > using this program. The same thing is happening in each client's
 > database. I can insert the same row 10 times, and only once or twice
 > will it not insert correctly. Blanks get inserted into the same 5 or
 > 6 fields.
 > I have tried doing a SELECT after the INSERT to see if the fields got
 > filled in correctly, then, if the field is blank I try to do an
 > UPDATE to correct the blank fields. This does not seem to work either.

Can you post an example of an isnert that does not work. Barring some
corruption, which seems unlikely given the frequency at many clients,
this is usually a programming issue. Could it be that you are inserting
unicode data into a non-unicode column? Are the problems always related
to character type columns?

Also post the table DDL.


--
David Gugick
Imceda Software
<a rel="nofollow" style='text-decoration: none;' href="http://www.imceda.com" target="_blank">www.imceda.com</a>

 >> Stay informed about: Some fields randomly not updated in INSERT and UPDATE 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Insert current values of updated table - SQL Server 2005. I want to implement an update trigger that will write the current (new) values to a new table. How do I get the current values for this updated row? thanks, steve

problem with before insert/update trigger - hey guys! i'm not able to understand the problem. the situation is like this, i've a table that has before insert/update trigger which checks for some data in some tables and if the data is not found it suppose to throw an error. to get the data, that i...

"Cannot insert duplicate key" error on UPDATE, WHAT???? - Hi Everyone, I just setup a few thing on the tables in this database so that no one can delete records. And I just noticed today that a proc I have does not work correctly. I just added this trigger (no others exist for this table): CREATE TRIGGER..

sysperfinfo does not get updated correctly - Hi, I have sql server 2000 installed as clustered resorce and on the server we have 2GB memory. The target server memeory is assigned as 1.5 GB for SQL server. Now as we all know that sql server tries to acquire as much memory as it can until it reache...

dm_exec_requests start_time not being updated? - I monitor for long running queries by comparing the start_time from dm_exec_requests to getdate() to see how long a session has been running. I recently got alerted for a long running query but on closer inspection there was no long running query. It..
   Database Help (Home) -> Server All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]