Solved

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

Posted on 2008-09-29
2
592 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

717 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