Solved

Good efficient practice with accessing a database developing a web application

Posted on 2006-11-12
2
152 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Store results in vb.net 3 21
Help with exporting to excel 4 28
Winform Module - What is the ASP.Net equiv 2 22
No Data for DropDown List 2 26
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

810 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