3

In Visual Studio i changed a field name in data base project.

IdInInGeo -> IdInIngeo

After i do Schema compare but it's not recognized any changes in this table.
In Schema compares's Options i can't find a any settings about fields register (maybe because my english is weak).
How to make that Schema compare see fields name's changes like in my case? Any advises?

Kliver Max
  • 5,107
  • 22
  • 95
  • 148
  • I have noticed that sometimes DataTools needs a small budge. Save your project, restart Visual Studio and repeat the schema compare. If you want to have a look at the compare settings, when in the schema compare screen click the small gear button at the top. – Marcel N. Aug 07 '14 at 08:48
  • @MarcelN. I tried restart VS, after repeated Schema Compare but get same result. I found a Options button but can't find any settings inside for solve my problem (if this settings exists). – Kliver Max Aug 07 '14 at 08:56
  • 1
    Maybe this will help out? [Stackoverflow-Thread][1] [1]: http://stackoverflow.com/questions/17203916/case-sensitivity-and-database-projects – Alexander Schmidt Aug 07 '14 at 08:56
  • Even with "Validate casing on identifiers" and a database collation of `SQL_Latin1_General_CP1_CI_AS` (as suggested in the referenced question), schema compare is not picking up column name case changes for me. – Brian Diggs Nov 16 '18 at 21:09

1 Answers1

3

It happened to me one time. I could fix it using the following steps:

  • Go to your database's Project Settings
  • Tick right the checkbox entitled "Validate Casing on Identifiers"
  • Click on the button "Database Settings"
  • Under the "Data Collation" list, select: SQL_Latin1_General_CP1_CS_AS
  • Click OK

Doing so would most probably allow you to detect changes in schema names.

Do note that a one-character difference in the collation may lead to different results. For example, CI means case-insensitive, whereas changing it to CS makes it case-sensitive.

Hope this helps.

Taher A. Ghaleb
  • 5,120
  • 5
  • 31
  • 44
  • As I mentioned in a comment when I started the bounty, this approach (mentioned in https://stackoverflow.com/a/17204187/892313) did not work for me. That is why I placed the bounty. – Brian Diggs Nov 21 '18 at 20:39
  • I see. By default, columns inherit the collation of the database. Can you please tell what's the collation of the columns? – Taher A. Ghaleb Nov 21 '18 at 21:26
  • By the way, I see your comment there and found that you're using `SQL_Latin1_General_CP1_CI_AS` rather than `SQL_Latin1_General_CP1_CS_AS` – Taher A. Ghaleb Nov 21 '18 at 22:02
  • I missed that one character difference between what you suggested and what I had tried. Your answer does work. If you edit your answer, I will reverse the down-vote to an up-vote. – Brian Diggs Nov 21 '18 at 22:43
  • Glad to hear that it worked. But what shall I edit in my answer? You mean to mention the one-character difference? – Taher A. Ghaleb Nov 21 '18 at 22:47
  • The content of the edit is not that important, although highlighting that one character difference is probably good. The issue is that I can't change my vote unless the answer has changed. So that's why I want you to make an edit. – Brian Diggs Nov 21 '18 at 23:12
  • @BrianDiggs - the last vowel of General of the example should be a vice e. – Brett Aug 14 '23 at 17:22
  • Thanks for pointing that out, @Brett. I fixed it. – Taher A. Ghaleb Aug 14 '23 at 22:06