ASP.Net and data access

ASP.Net and data access

am 20.01.2005 20:59:02 von Paul

I 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"%>


orders


















Order ID

<%# DataBinder.Eval(Container.DataItem, "OrderID") %>







************************************************


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:




orders



value="dDw1NzE5OTAzNTI7Oz6dpCg+ix9Yj9gsw5NbtgI82h5suw==" />







I just cant understand why I am not getting any data.

Any help would be much appreciated.

Re: ASP.Net and data access

am 20.01.2005 21:25:29 von reb01501

There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.

HTH,
Bob Barrows

Re: ASP.Net and data access

am 20.01.2005 21:39:09 von Paul

Will do.

Thanks.

"Bob Barrows [MVP]" wrote:

> There was no way for you to know it, but this is a classic asp newsgroup.
> While you may be lucky enough to find a dotnet-savvy person here who can
> answer your question, you can eliminate the luck factor by posting your
> question to a newsgroup where the dotnet-savvy people hang out. I suggest
> microsoft.public.dotnet.framework.aspnet.
>
> HTH,
> Bob Barrows
>
>
>