473,322 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Data Access

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?
Nov 22 '05 #1
3 1337
This won't take care of binding to your form but you may
find the code generator does enough of the rest to make it
a viable solution for SQL Server or Microsoft Access.

Plus, it is OOP...

http://www.eggheadcafe.com/articles/..._generator.asp

--
2004 and 2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net

"rufus" <ru***@discussions.microsoft.com> wrote in message
news:37**********************************@microsof t.com...
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?

Nov 22 '05 #2
Rufus,

It has it limitations (max 100 datafields, the same as with the designer no
joined tables etc etc). For the rest is works mostly fine (when you have
some more extended problems you would have to do it yourself). However from
what I read in your message will it probably fit on at least 80%.

http://msdn.microsoft.com/library/de...classtopic.asp

It is there as well as SQL, Oracle, ODBCcommandbuilder.

I hope this helps,

Cor
Nov 22 '05 #3
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/pe...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?

Nov 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: sffan | last post by:
I am new to database programming and was curious how others solve the problem of storing encrypted in data in db table columns and then subsequently searching for these records. The particular...
6
by: Hamed | last post by:
Hello I have employed as a developer in a software company that its team uses FoxPro / VB 6.0 / VC++ 6.0 as the developing tools and newly is going to migrate to VS.NET. There is a project...
0
by: sedefo | last post by:
I ran into this Microsoft Patterns & Practices Enterprise Library while i was researching how i can write a database independent data access layer. In my company we already use Data Access...
32
by: Neil Ginsberg | last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC linked tables. I recently created a new set of tables for the app, and users are complaining that unsaved data is being...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
9
by: Tony Lee | last post by:
Some time a ago, on this newsgroup the following comments were made in recommending good references for Access (2003) >I used to recommend Dr. Rick Dobson's, "Programming Access <version>" for...
3
by: Lyle Fairfield | last post by:
In a recent thread there has been discussion about Data Access Pages. It has been suggested that they are not permitted on many or most secure sites. Perhaps, that it is so, although I know of no...
1
by: Johann Blake | last post by:
I am looking for a good solution on how to implement data access in an application so that there is a clean separation between the data access layer, the business layer and the GUI layer. I am...
0
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.