Click here to Skip to main content
15,510,771 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: WSO CCC OTD 29-Oct-2021 Pin
DerekT-P29-Oct-21 12:18
professionalDerekT-P29-Oct-21 12:18 
GeneralRe: WSO CCC OTD 29-Oct-2021 Pin
pkfox1-Nov-21 0:06
professionalpkfox1-Nov-21 0:06 
GeneralRe: WSO CCC OTD 29-Oct-2021 Pin
DerekT-P29-Oct-21 12:23
professionalDerekT-P29-Oct-21 12:23 
GeneralWell, here goes ... my Surface is updating to Win 11. Pin
OriginalGriff28-Oct-21 22:50
mveOriginalGriff28-Oct-21 22:50 
GeneralRe: Well, here goes ... my Surface is updating to Win 11. Pin
den2k8828-Oct-21 23:32
professionalden2k8828-Oct-21 23:32 
PraiseRe: Well, here goes ... my Surface is updating to Win 11. Pin
Gary R. Wheeler30-Oct-21 11:47
Gary R. Wheeler30-Oct-21 11:47 
GeneralRe: Well, here goes ... my Surface is updating to Win 11. Pin
Gaston Verelst29-Oct-21 0:00
Gaston Verelst29-Oct-21 0:00 
QuestionDoes anyone do database tier field validation? Pin
honey the codewitch28-Oct-21 17:20
mvahoney the codewitch28-Oct-21 17:20 
A looong time ago, as part of a middleware builder I wrote, it would generate SQL-DDL scripts to create tables and the stored procedures necessary to access them.

One of the things it did was use text cursors to run regular expressions over fields to validate them. Basically, it generated the SQL code to use a table based state machine to walk the fields and validate a regular expression so that if you passed a phone number or an email address in as a string it would reject invalid candidates.

The same thing happened at the middle tier, and at the front end web page, so no matter how you hit it, it would *not* let you put invalid data in the database.

I've almost never seen this done in practice elsewhere, but it has been a long time since I've done this kind of development professionally, and I was wondering how common a practice it is (maybe using some of the newfangled SQL Server features for example) to do granular field validation like that?

One reason I ask is because I have a tool that can potentially generate the SQL-DDL scripts to do this, but I don't know how useful it would be to people in practice.
Real programmers use butterflies

AnswerRe: Does anyone do database tier field validation? Pin
PIEBALDconsult28-Oct-21 17:30
professionalPIEBALDconsult28-Oct-21 17:30 
GeneralRe: Does anyone do database tier field validation? Pin
honey the codewitch28-Oct-21 17:49
mvahoney the codewitch28-Oct-21 17:49 
GeneralRe: Does anyone do database tier field validation? Pin
PIEBALDconsult28-Oct-21 18:34
professionalPIEBALDconsult28-Oct-21 18:34 
AnswerRe: Does anyone do database tier field validation? Pin
megaadam28-Oct-21 22:25
professionalmegaadam28-Oct-21 22:25 
GeneralRe: Does anyone do database tier field validation? Pin
Dan Neely29-Oct-21 4:06
Dan Neely29-Oct-21 4:06 
GeneralRe: Does anyone do database tier field validation? Pin
PIEBALDconsult29-Oct-21 4:37
professionalPIEBALDconsult29-Oct-21 4:37 
GeneralRe: Does anyone do database tier field validation? Pin
honey the codewitch29-Oct-21 6:50
mvahoney the codewitch29-Oct-21 6:50 
GeneralRe: Does anyone do database tier field validation? Pin
PIEBALDconsult29-Oct-21 7:04
professionalPIEBALDconsult29-Oct-21 7:04 
GeneralRe: Does anyone do database tier field validation? Pin
honey the codewitch29-Oct-21 7:39
mvahoney the codewitch29-Oct-21 7:39 
QuestionWTE! Another programming question ? Pin
megaadam28-Oct-21 14:52
professionalmegaadam28-Oct-21 14:52 
AnswerRe: WTE! Another programming question ? Pin
Peter_in_278028-Oct-21 15:20
professionalPeter_in_278028-Oct-21 15:20 
GeneralRe: WTE! Another programming question ? Pin
Jon McKee28-Oct-21 15:34
professionalJon McKee28-Oct-21 15:34 
GeneralRe: WTE! Another programming question ? Pin
Dan Neely29-Oct-21 4:11
Dan Neely29-Oct-21 4:11 
GeneralRe: WTE! Another programming question ? Pin
Jon McKee29-Oct-21 12:29
professionalJon McKee29-Oct-21 12:29 
GeneralRe: WTE! Another programming question ? Pin
megaadam28-Oct-21 23:10
professionalmegaadam28-Oct-21 23:10 
AnswerRe: WTE! Another programming question ? Pin
Jon McKee28-Oct-21 15:30
professionalJon McKee28-Oct-21 15:30 
GeneralRe: WTE! Another programming question ? Pin
PIEBALDconsult28-Oct-21 15:46
professionalPIEBALDconsult28-Oct-21 15:46 

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.


Straw Poll

An amazing AI programming tool is invented that can do one task perfectly. What would you choose?
  Results   555 votes