RE: Data Access
- From: Jorge L Matos [MCSD.NET] <matos_jorge_NOSPAM_AT_hotmail.com>
- Date: Mon, 16 May 2005 10:02:11 -0700
Someone has already written some code to use reflection and custom attributes
to dynamically build the required SQL.
http://www.codeproject.com/cs/database/dal1.asp
http://www.codeproject.com/dotnet/persistence_by_reflection.asp
"rufus" wrote:
> Up until now I have been using OR Mapping tools for my database access. I
> liked this approach because with one line of code I could bind my form fields
> to my objects and then persist them. The SQL code for update and insert was
> generated instrinsically.
>
> Now I need to use more 'mainstream' methods of data manipulation but am
> becoming a little frustrated. If i wish to insert some data submitted by a
> form, I need to append the contents of each form field as a parameter to
> execute the stored procedure. Not to mention having to write the insert SQL
> for the stored procedure. I find this tedious and the code can be quite long
> when there are say 30 form fields that need to be inserted or updated.
>
> My question is, is there are way to perform insert, update or deletes
> without have to write any (or at least limited) sql? Or are there any
> methods that reduce the amount of code to retrieve form field contents and do
> an update? Ideally I would like to use reflection to map beween my form
> fields and the correct column in the table. Is this possible? Am I missing
> something obvious?
.
- References:
- Data Access
- From: rufus
- Data Access
- Prev by Date: Re: Setup Package Does Not Replace Obsolete Files
- Next by Date: Re: Socket problem
- Previous by thread: Re: Data Access
- Next by thread: [ANN] edtFTPnet/PRO 1.0.4 released
- Index(es):
Relevant Pages
|