dbTalk Databases Forums  

SSMS 2008: Confusing/Incorrect Error Message

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss SSMS 2008: Confusing/Incorrect Error Message in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gene Wirchenko
 
Posts: n/a

Default SSMS 2008: Confusing/Incorrect Error Message - 04-13-2011 , 03:20 PM






Dear SQLers:

I have a couple of problems with Edit Top 200 Rows.

1) I call it up on one table, change one column value (not a key
column) from "Cheque" to "Check". When I try to exit the row, I get:

No row was updated.

The data in row 3 was not committed.
Error Source: Microsoft.SqlServer.Management.DataTools.
Error Message: The row value(s) updated or deleted either do not make
the row unique or they alter multiple rows(2 rows).

Correct the errors and retry or press ESC to cancel the change(s).

and an OK button.

2) After I have run Edit Top 200 Row and have closed it, I can not
rerun my database creation script because the database is supposedly
in use.

Have I done something wrong, or is this a bug?

Sincerely,

Gene Wirchenko

Reply With Quote
  #2  
Old   
Henk van den Berg
 
Posts: n/a

Default Re: SSMS 2008: Confusing/Incorrect Error Message - 04-13-2011 , 03:56 PM






There's a setting in SSMS where you can change this 200 to unlimited.
That way, you can check your entire table for the multiple rows. The
screendump can be found at
http://www.hvandenberg.net/limitrowsinSSMS.bmp

Best,
Henk

On 13-04-2011 22:20, Gene Wirchenko wrote:
Quote:
Dear SQLers:

I have a couple of problems with Edit Top 200 Rows.

1) I call it up on one table, change one column value (not a key
column) from "Cheque" to "Check". When I try to exit the row, I get:

No row was updated.

The data in row 3 was not committed.
Error Source: Microsoft.SqlServer.Management.DataTools.
Error Message: The row value(s) updated or deleted either do not make
the row unique or they alter multiple rows(2 rows).

Correct the errors and retry or press ESC to cancel the change(s).

and an OK button.

2) After I have run Edit Top 200 Row and have closed it, I can not
rerun my database creation script because the database is supposedly
in use.

Have I done something wrong, or is this a bug?

Sincerely,

Gene Wirchenko

Reply With Quote
  #3  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: SSMS 2008: Confusing/Incorrect Error Message - 04-13-2011 , 04:07 PM



On Wed, 13 Apr 2011 22:56:58 +0200, Henk van den Berg
<hvandenberg (AT) xs4all (DOT) nl> wrote:

Quote:
There's a setting in SSMS where you can change this 200 to unlimited.
That way, you can check your entire table for the multiple rows. The
screendump can be found at
http://www.hvandenberg.net/limitrowsinSSMS.bmp
This has nothing to do with the problem. I can see the entire
table on the screen.

I have verified in the trigger that only one row is being changed
with Edit Top 200 Rows. If I remove the trigger, the problem is gone.
If I put the trigger back in but commenting out the parts that change
values, I get the problem again.

If I execute SQL statements in a script, they work fine. It is
only in Edit Top 200 Rows that it does not work.

[snipped previous]

Sincerely,

Gene Wirchenko

Reply With Quote
  #4  
Old   
Henk van den Berg
 
Posts: n/a

Default Re: SSMS 2008: Confusing/Incorrect Error Message - 04-13-2011 , 04:23 PM



Does the trigger fire another trigger in turn?

Best,
Henk

On 13-04-2011 23:07, Gene Wirchenko wrote:
Quote:
On Wed, 13 Apr 2011 22:56:58 +0200, Henk van den Berg
hvandenberg (AT) xs4all (DOT) nl> wrote:

There's a setting in SSMS where you can change this 200 to unlimited.
That way, you can check your entire table for the multiple rows. The
screendump can be found at
http://www.hvandenberg.net/limitrowsinSSMS.bmp

This has nothing to do with the problem. I can see the entire
table on the screen.

I have verified in the trigger that only one row is being changed
with Edit Top 200 Rows. If I remove the trigger, the problem is gone.
If I put the trigger back in but commenting out the parts that change
values, I get the problem again.

If I execute SQL statements in a script, they work fine. It is
only in Edit Top 200 Rows that it does not work.

[snipped previous]

Sincerely,

Gene Wirchenko

Reply With Quote
  #5  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SSMS 2008: Confusing/Incorrect Error Message - 04-13-2011 , 04:50 PM



Gene Wirchenko (genew (AT) ocis (DOT) net) writes:
Quote:
1) I call it up on one table, change one column value (not a key
column) from "Cheque" to "Check". When I try to exit the row, I get:

No row was updated.

The data in row 3 was not committed.
Error Source: Microsoft.SqlServer.Management.DataTools.
Error Message: The row value(s) updated or deleted either do not make
the row unique or they alter multiple rows(2 rows).

Correct the errors and retry or press ESC to cancel the change(s).
and an OK button.
I don't that grid, and make all my data modifications with scripts.
Scripts can be reusable. And trying to second-guess SSMS which has
some funny quirks, is nothing I like.

Hint: you learn more SQL, if you use scripts.

I can say whether the error message you got makes sense or not, since
I don't know the table or the data.


Quote:
2) After I have run Edit Top 200 Row and have closed it, I can not
rerun my database creation script because the database is supposedly
in use.

Have I done something wrong, or is this a bug?
I would guess this is regular connection pooling. That is, the client
API holds the connection for 60 seconds after disconnection so it
can be resued. This is nothing specific to SSMS.

The way out is

ALTER DATBASE db SET SINGLE_USER WITH ROLLBACK IMMEDIATE

That kills all connections against the database.

--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx

Reply With Quote
  #6  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: SSMS 2008: Confusing/Incorrect Error Message - 04-13-2011 , 07:18 PM



On Wed, 13 Apr 2011 23:23:56 +0200, Henk van den Berg
<hvandenberg (AT) xs4all (DOT) nl> wrote:

Quote:
Does the trigger fire another trigger in turn?
No.

[snip]

Sincerely,

Gene Wirchenko

Reply With Quote
  #7  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: SSMS 2008: Confusing/Incorrect Error Message - 04-13-2011 , 07:26 PM



On Wed, 13 Apr 2011 23:50:35 +0200, Erland Sommarskog
<esquel (AT) sommarskog (DOT) se> wrote:

Quote:
Gene Wirchenko (genew (AT) ocis (DOT) net) writes:
1) I call it up on one table, change one column value (not a key
column) from "Cheque" to "Check". When I try to exit the row, I get:

No row was updated.

The data in row 3 was not committed.
Error Source: Microsoft.SqlServer.Management.DataTools.
Error Message: The row value(s) updated or deleted either do not make
the row unique or they alter multiple rows(2 rows).

Correct the errors and retry or press ESC to cancel the change(s).
and an OK button.

I don't that grid, and make all my data modifications with scripts.
^^^^^^^^^^^^^^^^^
A missing word?
Quote:
Scripts can be reusable. And trying to second-guess SSMS which has
some funny quirks, is nothing I like.
Well, I have been running just scripts, blowing away the database
each time to minimise error possibilities. I thought that I would try
checking the checking with Edit Top 200 Rows, because it would be
easier. <bitter>Yeah, right.</>

Quote:
Hint: you learn more SQL, if you use scripts.
I know: it is my preference. And get bitten harder if you do
not?

Quote:
I can say whether the error message you got makes sense or not, since
I don't know the table or the data.
It is a very simple table with one check for one column of "D" or
"C". It and two other columns get NiceString() done to them, but I
have the problem even when I reduce the trigger so that it is just
running through the cursor and writing it all without change.

Quote:
2) After I have run Edit Top 200 Row and have closed it, I can not
rerun my database creation script because the database is supposedly
in use.

Have I done something wrong, or is this a bug?

I would guess this is regular connection pooling. That is, the client
API holds the connection for 60 seconds after disconnection so it
can be resued. This is nothing specific to SSMS.

The way out is

ALTER DATBASE db SET SINGLE_USER WITH ROLLBACK IMMEDIATE

That kills all connections against the database.
I may try that. I might just avoid Edit Top 200 Rows.

My scripts use explicit database selection, including select
master at the end to disconnect.
use Banking
go
<stuff>
use master
go
A pity I can not do this with Edit Top 200 Rows.

Sincerely,

Gene Wirchenko

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.