[thelist] .NET and MSSQL data validation

Jon Molesa rjmolesa at consoltec.net
Thu Jun 28 21:56:04 CDT 2007


*On Thu, Jun 28, 2007 at 12:34:27PM -0700 Joel D Canfield <joel at streamliine.com> wrote:

> Date: Thu, 28 Jun 2007 12:34:27 -0700
> From: "Joel D Canfield" <joel at streamliine.com>
> To: <thelist at lists.evolt.org>
> Subject: [thelist] .NET and MSSQL data validation
> 
> I'm working on an intranet project for a friend who is the director of
> His question: aware of .NET's data validation capabilities, he wonders
> of it can also enforce restraints created in the database (for instance,
> this office has these data ports, so if that office is chosen, only
> allow choices of data ports that really exist in the office.) I would
> normally use a combination of scripting and db logic to enforce that.
> there's no point in building that logic in the quick and dirty, if .NET
> is just going to supplant it. if it doesn't do that (which is my guess)
> then we build the db logic with the classic ASP quick and dirty, because
> we'll be reusing it almost verbatim in the .NET version.

I'm not a dotnet guy myself, but this type of functionality appears to
be of the MVC type.  Model, View, Control.  I've been working with it in
PHP myself.  I've tinkered with .NET and have written some desktop apps.
I'm not aware that .NET offers MVC built in.  But MS's controls are
usually databound which saves some time.  However, I'm not a fan of
binding.  But I'm a control freak.  If I'm understanding your example
as you intended it to be, the datatype would be an enum (Port1, Port2,
Port3).  Then after connecting the code to the db and running a query on
the table the form would generate say a radio select offering these 3 
choices to the user?  If I'm on the right path then an MVC framework is 
what you're after.  I saw one recently for .NET.  Couldn't tell you the 
name now to save my life.  I think it was on SourceForge.  I may be way
off base here because you did ask about validation.  But it sounds like
this may be what you're after.  It cuts coding time in half.  MVC's a
saweet.

> 
> My question: how long does it take to get from pretty comfortable with
> classic VBScript ASP and MSSQL and object-oriented life in general, but
> with zero real programming languages, to a point where I can build this
> tool in .NET without using the WYSIWYG designer thingies I've seen?
> 

Never looked over ASP.  But if VBScript is like VB then I'd try
transitioning to VB.NET.  I think the syntax is similar.  I jump from VB6
to C#.  Wildly different, but it has helped in other areas.

Just my 2 cents worth.

-- 
Jon Molesa
rjmolesa at consoltec.net



More information about the thelist mailing list