Problems w/ADO.Net

  • Thread starter Thread starter taffholter
  • Start date Start date
T

taffholter

I have an annoying and, thus far, untraceable error in a large VB.net app I
have developed.

My problem started several months ago while using VS2005. The app was
developed with a tableAdapters and the data designer. Without notice, a
single field (empIncome) stopped writing to my SQL Server. The field had
worked fine for a year. I traced the code/XML as best I could and found no
errors. I ran a Profiler trace on SQL Server and if that field is the sole
field updated, no update hits the server. If other fields are updated, the
field in question is ignored.

To resolve the issue, I first tried removing the field from the dataset
(including XML) and rebuilding it. It still failed. I upgraded to VS2008.
I then added a new field (empIncome1) to the table (textbox) and copied the
erroring field into it. I laid the field (txtempIncome1) next to the
erroring field and was able to update the data fine. The changes to
txtempIncome1 were reflected in txtempIncome. Thinking I resolved the issue,
I deleted the erroneous textbox ((txtempIncome). I tested the data again in
txtempIncome1 and it worked. After removing empIncome then renaming
empIncome1 back to empIncome, the same problem occurred. What else could the
problem be? Would it have to be in the XML? But I regenerated that too.

I renamed the field back to empIncome so I could avoid having to update all
my reports, queries, etc. Ultimately I stuck with empIncome1. It solved the
immediate problem bud it did not explain the cause of the problem.

I thought the problem was gone. We did not have any issues until a month
ago when the problem occurred out of the blue on a field that had not been
touched for months. Exactly the same problem – new field.

Does anyone have an idea of what is going on? It is pretty much designer
drag and drop by the book. It is not in the SQL Server end.

Thanks,

Tom Affholter
(e-mail address removed)
 
Are you saying that the Profiler showed an UPDATE statement being executed
but the column value in the database did not change? I would say this IS a
SQL Server issue--unrelated to how the UPDATE statement is generated. Are
you trapping exceptions? Have you tried to copy the UPDATE statement from
the Profiler trace and paste it into a SSMS query editor window and
executing it? This should return an exception you can see first-hand if
there is an issue.

--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
____________________________________________________________________________________________
 
Hello William,
Are you saying that the Profiler showed an UPDATE statement being
executed but the column value in the database did not change? I would
say this IS a SQL Server issue--unrelated to how the UPDATE statement
is generated. Are you trapping exceptions? Have you tried to copy the
UPDATE statement from the Profiler trace and paste it into a SSMS
query editor window and executing it? This should return an exception
you can see first-hand if there is an issue.

A trigger might also be the culprit...

Jesse
 
Back
Top