[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

SQL Data Source for Windows Forms (Applications)?

Posted on 2008-06-14
2
Medium Priority
?
1,772 Views
Last Modified: 2013-11-27
Heya

I've recently started playing around with building windows apps using VS2008 and although I can code sql connections, commands etc. manually there doesn't seem to be something like the SQL Data Source manager you get when building web apps. I see the Dataset can hold queries for you but it all seems a bit code heavy. Can anyone point me towards some good tutorials for building data connected based windows apps with SQL server?

The SQL Data Source in web apps has optimistic concurency, couldn't see anything like this in dataset, I take it this would have to be coded manually in a windows app?

Many thanks!
0
Comment
Question by:garethh86
[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 34

Accepted Solution

by:
Sancler earned 2000 total points
ID: 21787996
As I don't do Web apps, I may be on the wrong tack, but it sounds to me as though the equivalent to what you're seeking in WinForms is provided by the Data Sources tab in Solution Explorer.  If, on that, you click on Add New Data Source it will run a Wizard enabling you to choose a server, database, tables, etc and the the Designer creates the necessary objects - dataset, connection, adapters.  Although the auto-generated code is based on DATAAdapters, it "wraps" them up in TABLEAdapters: that means they are less familiar.  If you prefer to work with DATAAdapters directly, there is a configuration wizard for those, too.  In the Toolbox, right click on the Data tab and then on Choose Items ... and select an SQLDataAdapter.  When that has appeared in the Toolbox, if you drag it to your form it will start the wizard for that.

As to Optimistic Concurrency, that's the default approach in ADO.NET.  This is a good starting point.

http://msdn.microsoft.com/en-us/library/aa0416cz.aspx

Although that describes how to implement it in code you will, if you use any of the wizards to configure data sources and then examine the code the designer produces, find that that is the approach that they implement.

Roger
0
 
LVL 7

Author Closing Comment

by:garethh86
ID: 31467168
Nice one, thanks, played around with this is VS and it is fairly similiar, I first went in, didn't see sqldataadapter and panicked!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

656 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