Solved

Best practice to read, insert, update SQL data in Visual Studio - Winforms?

Posted on 2008-09-29
2
588 Views
Last Modified: 2013-12-17
I have a winform app that I'm developing in VS2008 for workstations running .net 2.x framework. What's the preferred method to insert / update/ read calls to SQL, especially when the displayed data resides in several tables? I'm getting my data by means of a stored procedure which joins the data together and need to save data back to they're perspective tables.

It seems to me there would be a really cool way of doing this. Right now, I'm considering just writing  stored procedures and letting them do the CRUD stuff. If that's the only option, what's the best way to call them while passing all of the params? Also, do you agree that splitting out all database access into it's own data access layer is a good practice?

Since the clients are running .Net 2, I'd rather not upgrade them to 3.5, which get's rid of linq. OR, is LINQ that cool to where it's worth the trouble? If so, can you give me some examples?

TIA!
0
Comment
Question by:asp316
2 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 22604254
I see 2 possibilities that you can do:
1. Use a stored procedure and pass all the variables to your stored procedure
2. Create a sql-command object (for each sql-statement), add the parameters to that sql-command and perform them all together in a transaction. (perform this in a database-layer)
0
 

Accepted Solution

by:
asp316 earned 0 total points
ID: 22724948
I found subsonic! Very cool!!

http://subsonicproject.com/
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question