Click here to Skip to main content
15,917,565 members
Home / Discussions / Database
   

Database

 
GeneralSql qstn(bit) Pin
hari4ur5-Apr-08 0:22
hari4ur5-Apr-08 0:22 
GeneralRe: Sql qstn(bit) Pin
Colin Angus Mackay5-Apr-08 5:04
Colin Angus Mackay5-Apr-08 5:04 
GeneralRe: Sql qstn(bit) Pin
Mycroft Holmes5-Apr-08 18:16
professionalMycroft Holmes5-Apr-08 18:16 
GeneralMSSQL 2000 trigger on update [modified] Pin
Ronni Marker4-Apr-08 23:12
Ronni Marker4-Apr-08 23:12 
GeneralRe: MSSQL 2000 trigger on update Pin
Ronni Marker5-Apr-08 1:24
Ronni Marker5-Apr-08 1:24 
GeneralI have an Interesting Problem Pin
keencomputer4-Apr-08 20:43
keencomputer4-Apr-08 20:43 
GeneralRe: I have an Interesting Problem Pin
Rami Said Abd Alhalim5-Apr-08 23:44
Rami Said Abd Alhalim5-Apr-08 23:44 
GeneralConcurrency violation on update command. Pin
msx234-Apr-08 14:11
msx234-Apr-08 14:11 
Hi all, I'm having a problem with updating a row in the table when the value was originally NULL. Using c# and Visual Studio 2005 by the way.

Through my front end I can modify existing values and commit those changes to the database just fine, but the problem arises when I try and change a field that was NULL to a non-NULL value.
(Oh, I can also change a field that has a value to NULL just fine)

When I get to my DbAdapter.Update(DATASET HERE); line I catch an exception with the following text:
"Concurrency violation: the UpdateCommand affected 0 of the expected 1 records."
And the thing is, when I comment out (of the update stored procedure in SQL) the part of the WHERE clause that states ((@IsNull_FIELDNAME = 1 AND [FIELDNAME] IS NULL) OR ([FIELDNAME] = @Original_FIELDNAME))where FIELDNAME is the one field that I'm trying to update, it works fine.
I can't figure out why that WHERE clause is failing. I'm not updating the database anywhere else in the code other than the one spot that is failing out when I try and fill a previously NULL field. I've used VS2005's auto-generating wizard to create my stored procedures and command generators so there isn't any disagreement between the table/SP/c# that I can find.
When I breakpoint at the DbAdapter.Update(DATASET HERE); line my dataset has the right values in it.

Does anyone have any ideas? I'm pretty stuck here.

Thanks
GeneralRe: Concurrency violation on update command. Pin
Rami Said Abd Alhalim5-Apr-08 23:49
Rami Said Abd Alhalim5-Apr-08 23:49 
QuestionStored-Procedure (SP) - Executed as single transaction? Pin
Adeel Chaudhry4-Apr-08 9:26
Adeel Chaudhry4-Apr-08 9:26 
AnswerRe: Stored-Procedure (SP) - Executed as single transaction? Pin
Mark J. Miller4-Apr-08 12:03
Mark J. Miller4-Apr-08 12:03 
GeneralRe: Stored-Procedure (SP) - Executed as single transaction? Pin
Adeel Chaudhry5-Apr-08 4:50
Adeel Chaudhry5-Apr-08 4:50 
GeneralRe: Stored-Procedure (SP) - Executed as single transaction? Pin
Mark J. Miller6-Apr-08 4:31
Mark J. Miller6-Apr-08 4:31 
QuestionHelp in understanding a simple query result Pin
Snowman584-Apr-08 8:17
Snowman584-Apr-08 8:17 
GeneralRe: Help in understanding a simple query result Pin
A Wong4-Apr-08 9:02
A Wong4-Apr-08 9:02 
GeneralRe: Help in understanding a simple query result Pin
Snowman584-Apr-08 9:10
Snowman584-Apr-08 9:10 
GeneralRe: Help in understanding a simple query result Pin
A Wong4-Apr-08 9:54
A Wong4-Apr-08 9:54 
GeneralRe: Help in understanding a simple query result Pin
Snowman584-Apr-08 10:00
Snowman584-Apr-08 10:00 
GeneralRe: Help in understanding a simple query result Pin
suppaman5-Apr-08 4:24
suppaman5-Apr-08 4:24 
GeneralRe: Help in understanding a simple query result Pin
Snowman586-Apr-08 16:17
Snowman586-Apr-08 16:17 
GeneralRe: Help in understanding a simple query result Pin
suppaman10-Apr-08 13:11
suppaman10-Apr-08 13:11 
QuestionSQL 2000 Problem Pin
hrrty4-Apr-08 1:48
hrrty4-Apr-08 1:48 
GeneralRe: SQL 2000 Problem Pin
GuyThiebaut4-Apr-08 11:30
professionalGuyThiebaut4-Apr-08 11:30 
GeneralHown to select the telephone number that is most dialled Pin
Daniel_Logan3-Apr-08 23:52
Daniel_Logan3-Apr-08 23:52 
GeneralRe: Hown to select the telephone number that is most dialled Pin
Colin Angus Mackay4-Apr-08 0:25
Colin Angus Mackay4-Apr-08 0:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.