Page 1 of 1

CRITICAL BUG: delete object deletes the WRONG object!

Posted: Thu 11 May 2017 11:28
by bugmenot2
Hi,

I just lost a bunch of important data due to DBforge deleting the wrong table. It can be reproduced as follows:
create table dbo."NAME" (x int)
create table dbo."""NAME""" (x int)
You will now have one table NAME and one table "NAME"

Then try to delete "NAME" in the "Database Explorer" pane. It will at first appear to have worked, but if you press F5 to refresh, you'll see that DBforge has actually dropped NAME, not "NAME". I guess that DBforge just messes up the quoting and generates a SQL statement along the lines of:

DROP TABLE dbo."NAME"
when it should have created a statement
DROP TABLE dbo."""NAME"""

Please get your quoting right!
Also, if you fix this, please verify that it also works with tables named [""] or "][", etc.
Otherwise, thank you for your excellent product.

Re: CRITICAL BUG: delete object deletes the WRONG object!

Posted: Thu 11 May 2017 12:29
by alexa
We won't change this behavior since it requires significant changes in the code of dbForge.

Re: CRITICAL BUG: delete object deletes the WRONG object!

Posted: Thu 11 May 2017 14:54
by bugmenot2
Hm. That kind of attitude bothers me.

Can't you at least take the issue seriously? If it's too hard to fix quoting properly you could at least implement a check to see if a delete would potentially affect the wrong object and then tell the user about it before the delete actually happens. That's the first mitigation that came to mind. There are probably better ways to fix this without a lot of effort.

I really like the devart products but if that's your attitude towards customers who found a bug, I won't feel comfortable recommending DBforge to my clients in the future.

Re: CRITICAL BUG: delete object deletes the WRONG object!

Posted: Tue 16 May 2017 10:30
by alexa
Thank you for bringing this to our attention.

We will reconsider this behavior when developing the next product versions.

However, we do not recommend using the quoting (square brackets, quotation marks) in object names.

Re: CRITICAL BUG: delete object deletes the WRONG object!

Posted: Fri 04 Aug 2017 14:07
by alexa
We would like to let you know that we have released dbForge Studio for SQL Server v5.5 where this issue is fixed https://www.devart.com/dbforge/sql/studio/download.html

Thank you for your help in improving dbForge Studio for SQL Server.