VB.NET Data Retrieval: How to Retrieve Entire Table Rows in MS SQL Server
(Page 1 of 5 )
There are times when you can't do things the easy way in ASP.NET 3.5. What if you can't rely on its default settings and have to define everything? That's when you might want to use VB.NET. This article will show you how to do that with an application that connects and retrieves data from an MS SQL Server database.
You might already know that you can connect and retrieve information from the MS SQL Server database in ASP.NET 3.5 by using a "click and drag" technique. For example, if you are working with GridView and DetailsView web controls, you can simply configure the SQL data source to connect, retrieve data and then display it on the web browser, without the need for any hard coding or customized code.
There are times, however, that you really need to customize your web development. For instance, you may need to define everything, not just rely on the default settings and formatting which are available in the ASP.NET 3.5 controls. This means you won't be using click and drag techniques.
It also means that you will need to write your own code or edit an existing source code that will accomplish the following functions:
1. Connect to the MS SQL server database. (Done in default.aspx.vb)
2. Retrieve information from the database according the SQL query commands. (Done in default.aspx.vb)
3. Display the information back to the web browser. (Done in default.aspx using repeater, headertemplate, itemtemplate and footertemplate controls).
This tutorial will focus on the use of VB.NET to connect and retrieve data from an MS SQL Server database in order to display entire table rows to the web browser, without using GridView or DetailsView web control.
Next: Retrieve entire database table rows and display on the browser >>
More .NET Articles
More By Codex-M