Solved

Good efficient practice with accessing a database developing a web application

Posted on 2006-11-12
2
182 Views
Last Modified: 2010-04-24
Hi
I am in the process of teaching myself VB.NET 2005. I have been a developer for over 20 years and I know there are many ways of doing things. So I would rather learn the most efficient way of accessing a database up front if possible.
1. Let me start from scratch. Lets say I am developing a web application, how and what do I need to do to access a MSSQL database?
2. How should I define a new DataSet and how would I make reference to the new dataset in my code?
3. If somebody has a very simple example of the way I should do my database access, it would be great.

I look forward to some helpfull answers.

Regards
kezit
0
Comment
Question by:kezit
[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 13

Accepted Solution

by:
newyuppie earned 500 total points
ID: 17924904
1. if you installed vb2005 i believe you already have all the drivers needed to access MSSQL databases. all the controls you need are in system.data.sqlclient

2. there are basically 2 options: typed datasets, or non typed datasets. the first ones are automatically generated by VB2005 when you use menu Data/Add New Data Source. the advantage of typed datasets is that a class gets automatically generated that exposes methods to directly access all the columns in your datatables by direct reference to the object. the most important generated object here would be the TableAdapter class.
the non typed datasets are when you create by code your connection, dataset, datatable, etc. only difference with typed datasets is that you will be using the DataAdapter class and not the TableAdapter.
i suggest you start with typed-datasets, and as you master it over time, maybe you could get more customization with the DataAdapter if you know what you are doing.
0
 

Author Comment

by:kezit
ID: 17925003
Ok, to create a typed dataset with a windows application it is no problem but if it is a Web application the data menu does not exist. How do i create a typed dataset for a web application?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

623 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