SQL Complete schema name detection

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
dsmidgy
Posts: 2
Joined: Wed 12 Jun 2019 06:24

SQL Complete schema name detection

Post by dsmidgy » Wed 12 Jun 2019 06:31

Hi. I wold like to report a bug. Among others, these two objects are present in a database: a schema "name1" and a table "Name1" (case difference on 1st letter). After you write a "SELECT * FROM name1.TableName", a name1 gets corrected to Name1 and then (correctly) back to name1. This works OK. But when you write "EXEC name1.MyProc" the schema is renamed to Name1 and it doesn't get corrected back into name1.

Could you please correct this. Thank you, D.

alexa

Re: SQL Complete schema name detection

Post by alexa » Fri 14 Jun 2019 12:43

In case there are multiple objects with different case in the database, dbForge remembers the case of the first found identifier in the database and uses it for all identifiers with this name.

dsmidgy
Posts: 2
Joined: Wed 12 Jun 2019 06:24

Re: SQL Complete schema name detection

Post by dsmidgy » Wed 19 Jun 2019 08:19

It is strange that you treat schema names and object names as they have the same role. In my case - to put a table name in front of a SP. When you have case sensitive environment, things will break. But I can understand why you implemented it like this - an object can have DB and schema as prefixes but it's not required. So after a punctuation, previous prefixes should be checked and fixed.

But as I understand it's a "Won't fix". Maybe you should consider to give schema names a priority when selecting identifiers. As many more objects are dependent on schema it is easier to fix a object name from time to time than fixing schema names all the time.

alexa

Re: SQL Complete schema name detection

Post by alexa » Wed 19 Jun 2019 12:05

In case you want the casing to be the same as in the suggestions list, please select the 'Do not change' option:
1. Select 'SQL Complete -> Options...' from the main menu. The 'Options' window opens.
2. Navigate to the 'Formatting -> Profiles' branch.
3. Select the active profile and click the 'Edit Profile...' button.
4. Expand the 'Text Case -> Identifier Case' node.
5. Select the 'Do not change' option.
6. Click 'OK'.

Though, we will reconsider the existing behavior when developing the next product versions.

Post Reply