Using SQL Server and Datagrids in Dreamweaver

Dreamweaver supports several different kinds of server programming models. One of these models is ASP.NET for both VB.NET as well as C#. As a Dreamweaver developer it’s sometimes difficult to understand exactly what you can or cannot do with ASP.NET. Working with the .NET framework can seem daunting to those who are not familiar with the technology.

Probably the best advantage of working with a RAD tool such as Dreamweaver is that the developer is protected from the complexities of OO design patterns and does not need a thorough understanding of the .NET framework in order to work with ASP.NET. Through the use of extremely powerful and highly intuitive wizards and input forms you can implement most of the components and features of ASP.NET without writing a single line of VB.NET or C# code.

In this tutorial we will explore two basic but powerful concepts in ASP.NET: Connecting to an SQL Server database, and using the data within that database to populate a DataGrid component to display a dynamic table on an ASPX Web Form.

Prerequisites: You need access to an SQL Server database for this tutorial as well as Dreamweaver MX. A small scale version of SQL Server (formerly named MSDE) called Express Edition is available for small scale desktop development for free from Microsoft:

http://www.microsoft.com/sql/editions/express/default.mspx

We will deploy a simple test database with a single table for testing purposes and then learn how we can connect to this database through Dreamweaver. We’ll then learn how to retrieve data from our test table and use it to populate a DataGrid component.

$2.89
- OR -

Overview

Preparing SQL Server

Regardless of which version of SQL Server you are running, you should have access to two valuable tools: Enterprise manager and SQL Query Analyzer. This article isn’t really designed to demonstrate SQL Server database administration so let’s assume you already know how to create a database using whichever version of SQL Server you have access to.

Begin by creating a new database called TestSQL, and then creating a new table for that database called TestTable. Within the TestTable create 7 new columns: TestID (int identity), FirstName (varchar 50), LastName (varchar 50), Address (varchar 50), City (varchar 50), Province (varchar 50), Phone (varchar 20).

Kevin Koch

Kevin KochKevin Koch is a senior software engineer with over 8 years experience designing and architecting primarily web based applications. Fresh out of college during the nineties he co-founded Task Solutions and developed several projects with the then popular classic ASP.

During the Dot Com boom Kevin left his position as president and joined a new venture to build an enterprise insurance claim system build upon J2EE technology. After the Dot Com crash Kevin schooled himself to become an expert with .NET technology and is currently freelancing his ASP.NET skills to build enterprise n-tier frameworks using advanced OO methodologies.

See All Postings From Kevin Koch >>

Reviews

Be the first to write a review

You must me logged in to write a review.