ASP.NET & Databases : Part 4
Published 10/26/01
Introduction
Welcome to another part in ASP &
Databases, this time we are going to be looking at how to display our data in
or on something. We're going to be using the DataSet that we got in Part 3,
and for you lazy people who want to steal my code, here it is -
<%@ Page Language="VB"
Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.Oledb" %>
<script language="VB" runat="server">
Sub Page_Load(sender as object, e as eventargs)
Dim objConn as New OleDBConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=e:\sff\site\db\test.mdb")
objConn.Open()
Dim ds as Dataset = New DataSet()
Dim objAdapter as New OleDbDataAdapter("SELECT * FROM users", objConn)
Dim objCmdBld as New OleDbCommandBuilder(objAdapter)
objAdapter.Fill(ds, "users")
'add any more code that I show you here. Don't close Tags yet. |