Click here to Skip to main content
15,891,513 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 11:18
professionalDerekT-P29-Oct-21 11:18 
GeneralRe: WSO CCC OTD 29-Oct-2021 Pin
pkfox31-Oct-21 23:06
professionalpkfox31-Oct-21 23:06 
GeneralRe: WSO CCC OTD 29-Oct-2021 Pin
DerekT-P29-Oct-21 11:23
professionalDerekT-P29-Oct-21 11:23 
GeneralWell, here goes ... my Surface is updating to Win 11. Pin
OriginalGriff28-Oct-21 21:50
mveOriginalGriff28-Oct-21 21:50 
GeneralRe: Well, here goes ... my Surface is updating to Win 11. Pin
den2k8828-Oct-21 22:32
professionalden2k8828-Oct-21 22:32 
PraiseRe: Well, here goes ... my Surface is updating to Win 11. Pin
Gary R. Wheeler30-Oct-21 10:47
Gary R. Wheeler30-Oct-21 10:47 
GeneralRe: Well, here goes ... my Surface is updating to Win 11. Pin
Gaston Verelst28-Oct-21 23:00
Gaston Verelst28-Oct-21 23:00 
QuestionDoes anyone do database tier field validation? Pin
honey the codewitch28-Oct-21 16:20
mvahoney the codewitch28-Oct-21 16: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 16:30
mvePIEBALDconsult28-Oct-21 16:30 
GeneralRe: Does anyone do database tier field validation? Pin
honey the codewitch28-Oct-21 16:49
mvahoney the codewitch28-Oct-21 16:49 
GeneralRe: Does anyone do database tier field validation? Pin
PIEBALDconsult28-Oct-21 17:34
mvePIEBALDconsult28-Oct-21 17:34 
AnswerRe: Does anyone do database tier field validation? Pin
megaadam28-Oct-21 21:25
professionalmegaadam28-Oct-21 21:25 
GeneralRe: Does anyone do database tier field validation? Pin
Dan Neely29-Oct-21 3:06
Dan Neely29-Oct-21 3:06 
GeneralRe: Does anyone do database tier field validation? Pin
PIEBALDconsult29-Oct-21 3:37
mvePIEBALDconsult29-Oct-21 3:37 
GeneralRe: Does anyone do database tier field validation? Pin
honey the codewitch29-Oct-21 5:50
mvahoney the codewitch29-Oct-21 5:50 
GeneralRe: Does anyone do database tier field validation? Pin
PIEBALDconsult29-Oct-21 6:04
mvePIEBALDconsult29-Oct-21 6:04 
GeneralRe: Does anyone do database tier field validation? Pin
honey the codewitch29-Oct-21 6:39
mvahoney the codewitch29-Oct-21 6:39 
QuestionWTE! Another programming question ? Pin
megaadam28-Oct-21 13:52
professionalmegaadam28-Oct-21 13:52 
AnswerRe: WTE! Another programming question ? Pin
Peter_in_278028-Oct-21 14:20
professionalPeter_in_278028-Oct-21 14:20 
GeneralRe: WTE! Another programming question ? Pin
Jon McKee28-Oct-21 14:34
professionalJon McKee28-Oct-21 14:34 
GeneralRe: WTE! Another programming question ? Pin
Dan Neely29-Oct-21 3:11
Dan Neely29-Oct-21 3:11 
GeneralRe: WTE! Another programming question ? Pin
Jon McKee29-Oct-21 11:29
professionalJon McKee29-Oct-21 11:29 
GeneralRe: WTE! Another programming question ? Pin
megaadam28-Oct-21 22:10
professionalmegaadam28-Oct-21 22:10 
AnswerRe: WTE! Another programming question ? Pin
Jon McKee28-Oct-21 14:30
professionalJon McKee28-Oct-21 14:30 
GeneralRe: WTE! Another programming question ? Pin
PIEBALDconsult28-Oct-21 14:46
mvePIEBALDconsult28-Oct-21 14: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.