ASP.Net and data access
am 20.01.2005 20:59:02 von PaulI have developed in ASP in the past and am now getting into ASP.Net and have
hit a road block. I've been reading tutorias and documents and am still
having problems. I have the following code example:
****************************************
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim DS As DataSet
Dim MyConnection As SqlConnection
Dim MyCommand As SqlDataAdapter
MyConnection = New
SqlConnection("server=sqlserver;database=sales;Trusted_Conne ction=Yes")
MyCommand = New SqlDataAdapter("select * from orders where orderid =
32000", MyConnection)
DS = New DataSet
MyCommand.Fill(DS, "Orders")
Repeater2.DataSource = DS
Repeater2.DataBind()
End Sub
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="orders.aspx.vb"%>
************************************************
This code looks good to me but when I run this, I do not get anything on the
page (blank). Here is the html after I run it:
I just cant understand why I am not getting any data.
Any help would be much appreciated.