Click here to Skip to main content
15,903,362 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Internet Explore/Edge and network admins Pin
Kirill Illenseer6-Apr-17 22:49
Kirill Illenseer6-Apr-17 22:49 
GeneralRe: Internet Explore/Edge and network admins Pin
Richard Deeming7-Apr-17 1:10
mveRichard Deeming7-Apr-17 1:10 
GeneralRe: Internet Explore/Edge and network admins Pin
Dar Brett7-Apr-17 2:45
Dar Brett7-Apr-17 2:45 
GeneralRe: Internet Explore/Edge and network admins Pin
jlongo7-Apr-17 12:43
jlongo7-Apr-17 12:43 
GeneralRe: Internet Explore/Edge and network admins Pin
milo-xml7-Apr-17 2:18
professionalmilo-xml7-Apr-17 2:18 
GeneralRe: Internet Explore/Edge and network admins Pin
Richard Jones7-Apr-17 2:41
Richard Jones7-Apr-17 2:41 
GeneralRe: Internet Explore/Edge and network admins Pin
Member 105274847-Apr-17 17:16
Member 105274847-Apr-17 17:16 
RantElephanting Microsoft Sunshines rantOTD Pin
Dan Neely6-Apr-17 5:09
Dan Neely6-Apr-17 5:09 
I'm using a .sqlproj for my database. It lets you create tables using a semi-designer UI which is nice. However it tries to limit the amount of SQL it generates to reproduce the designer which can be a problem; in particular with default value constraints if you need to generate update scripts instead of always publishing to the DB in VS itself (eg because you're distributing a desktop app instead of a website). Eg this is what I get by default.

SQL
[IsDirty] bit NOT NULL DEFAULT 0


Looks harmless right?

Except that when you publish, in SQL Server you get a generated constraint with a name like DF__UserPermi__IsDir_49ACE3F2B. Even this could be livable, except that the number on the end is randomly generated and consequently multiple create scripts will result in different postfixes on the constraint names. This in turn results in databases that whenever a constraint is touched (and the sqlproj's love of dropping constraints while doing anything else to a table means this is more often than you might otherwise thing) you can't have a single universal update script.

If MS had gone with full table and column names in its generated constraint names instead of truncating and affixing a random 8 digit hex number this wouldn't've mattered.

If MS would've used randoms and truncation (presumably to maintain a max length) and then put the name in the SQL it generates to describe the table in the .sqlproj it wouldn't've mattered.

Since they did neither of those things I just wasted 2.5 hours of my life modifying hundreds of lines of SQL to look like this instead:


SQL
[IsDirty] bit NOT NULL CONSTRAINT [DF_UserPermissions_IsDirty] DEFAULT 0

ELEPHANTING SUNSHINES!

And for more fun down the line, AIUI there's no way to automatically enforce explicit naming of new constraints (never mind actually have the project do the explicit naming for us). I shudder to think of what would happen if we ended up repeating the original problem with hundreds or thousands of systems deployed in the future instead of just a handful of beta testers.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius

Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt

GeneralRe: Elephanting Microsoft Sunshines rantOTD Pin
lopatir6-Apr-17 5:52
lopatir6-Apr-17 5:52 
GeneralRe: Elephanting Microsoft Sunshines rantOTD Pin
Dan Neely6-Apr-17 7:27
Dan Neely6-Apr-17 7:27 
GeneralRe: Elephanting Microsoft Sunshines rantOTD Pin
lopati: loaming6-Apr-17 17:43
lopati: loaming6-Apr-17 17:43 
GeneralRe: Elephanting Microsoft Sunshines rantOTD Pin
Dan Neely7-Apr-17 2:17
Dan Neely7-Apr-17 2:17 
GeneralI was sent this, and ... PinPopular
OriginalGriff6-Apr-17 4:58
mveOriginalGriff6-Apr-17 4:58 
GeneralRe: I was sent this, and ... Pin
TNCaver6-Apr-17 5:51
TNCaver6-Apr-17 5:51 
GeneralThought of the day Pin
OriginalGriff6-Apr-17 4:52
mveOriginalGriff6-Apr-17 4:52 
GeneralRe: Thought of the day Pin
lopatir6-Apr-17 4:54
lopatir6-Apr-17 4:54 
GeneralRe: Thought of the day Pin
CDP18026-Apr-17 4:58
CDP18026-Apr-17 4:58 
GeneralRe: Thought of the day Pin
W Balboos, GHB6-Apr-17 5:00
W Balboos, GHB6-Apr-17 5:00 
GeneralRe: Thought of the day Pin
megaadam6-Apr-17 5:04
professionalmegaadam6-Apr-17 5:04 
GeneralRe: Thought of the day Pin
Daniel Pfeffer6-Apr-17 5:08
professionalDaniel Pfeffer6-Apr-17 5:08 
GeneralRe: Thought of the day Pin
TNCaver6-Apr-17 6:00
TNCaver6-Apr-17 6:00 
GeneralRe: Thought of the day Pin
jeron16-Apr-17 6:00
jeron16-Apr-17 6:00 
GeneralAPOD Pin
R. Giskard Reventlov6-Apr-17 4:43
R. Giskard Reventlov6-Apr-17 4:43 
PraiseRe: APOD Pin
TheGreatAndPowerfulOz6-Apr-17 6:52
TheGreatAndPowerfulOz6-Apr-17 6:52 
GeneralSound of the Week Pin
Sander Rossel6-Apr-17 4:31
professionalSander Rossel6-Apr-17 4:31 

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.