J
jason
so i have a database schema, a .NET object library .dll, and an ASP
classic web application.
i'm wondering where in this setup i should place default values for
fields/columns of forms/objects/rows.
SQL Sever doesn't seem like a good candidate, because i'm using stored
procedures for all inserts. these procs use input parameters for each
of the values in case there IS a value other than default, but since
the parameters are optional, they are defined with the = null. so these
mechanisms basically completely circumvent the default values, because
either a value is specified by the caller of the proc, and that value
is stored, or the value is not specified by the caller, and a null is
stored. either way, no default values from the table definition.
The object library seems like a decent place, except that i would love
for it to be data driven. i suppose each object could keep track of all
of its own default variables. part of the constructor could be to go
find its default-value definition file, and load them up that way. does
anyone foresee any major architectural problems with this?
And the last option is to put the default value definitions in the ASP
code somehow, probably through a constants file, and value comparisons.
Much less elegant than putting them in the object library, but pretty
simple, too.
Thoughts? comments? Suggestions?
Thanks,
Jason
classic web application.
i'm wondering where in this setup i should place default values for
fields/columns of forms/objects/rows.
SQL Sever doesn't seem like a good candidate, because i'm using stored
procedures for all inserts. these procs use input parameters for each
of the values in case there IS a value other than default, but since
the parameters are optional, they are defined with the = null. so these
mechanisms basically completely circumvent the default values, because
either a value is specified by the caller of the proc, and that value
is stored, or the value is not specified by the caller, and a null is
stored. either way, no default values from the table definition.
The object library seems like a decent place, except that i would love
for it to be data driven. i suppose each object could keep track of all
of its own default variables. part of the constructor could be to go
find its default-value definition file, and load them up that way. does
anyone foresee any major architectural problems with this?
And the last option is to put the default value definitions in the ASP
code somehow, probably through a constants file, and value comparisons.
Much less elegant than putting them in the object library, but pretty
simple, too.
Thoughts? comments? Suggestions?
Thanks,
Jason