Welcome to Webhost4life Forum Sign in | Join | Faq

ASP.NET VB.NET

Started by hotwebideas at 09-15-2006 10:36 PM. Topic has 0 replies.

Print Search
Sort Posts:    
   09-15-2006, 10:36 PM
hotwebideas is not online. Last active: 9/16/2006 1:29:54 PM hotwebideas

Top 50 Posts
Joined on 03-25-2006
Posts 6
Database Connection Not Working with ASP:Repeater Control. Help
Reply Quote
For you ASP.NET experts, this is driving me crazy. If anyone can give me some directions, that would be great. This was working fine with classic ASP. So, I know my DSN is setup correctly.

I get the ole: Server Error in '/' Application. error

I have a DB connection set up in my server form:

sub page_load
dim dbconn,sql,dbcomm,dbread
    dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;    data source=" & server.mappath("DATABASENAME"))
    dbconn.Open()
    sql="select html from text_links where category='sports'"
    dbcomm=New OleDbCommand(sql,dbconn)
    dbread=dbcomm.ExecuteReader()
    textlinks.DataSource=dbread
    textlinks.DataBind()
    dbread.Close()
    dbconn.Close()
end sub

My ASP.NET Repeater Control:

<form runat=:server">
<asp:repeater runat="server" id="textlinks">
    <ItemTemplate>
        <%#Container.DataItem("html")%><br />
    </ItemTemplate>
</asp:repeater>
</form>

Thanks to all who can answer this,
Bruce


   Report 
Webhost4life Fo... » General Discuss... » ASP.NET VB.NET » Database Connection Not Working with ASP:Repeater Control. Help

Powered by Community Server, by Telligent Systems