470,811 Members | 1,323 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,811 developers. It's quick & easy.

Unhandled exception at Command object call

I'm trying to do an easy display of a few fields from a MSAccess
database on an aspx page in vb.net, but I get an error at the
"cy.DataSource = Cmd.ExecuteReader()" line :
System.Data.OleDb.OleDbException: IErrorInfo.GetDescription failed with
<%@ Import Namespace="System.Data" %>

<%@ Import Namespace="System.Data.OleDb" %>
<%@ Page Language="VB" debug="true"%>
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)

Dim strConn as string ="Provider=Microsoft.Jet.OLEDB.4.0;Data

Dim Conn as new OleDbConnection(strConn)
Dim strSQL as string ="SELECT lid,name FROM local"
Dim Cmd as New OleDbCommand(strSQL,Conn)
dim cy
cy.DataSource = Cmd.ExecuteReader()
End Sub
<form runat="server">
<body bgcolor="#FFFFFF">
<asp:DataList id="cy" runat="server"
RepeatColumns="1" RepeatDirection="vertical"

</b> <b><a href=#<%#
<%# Container.DataItem("name")%>
</a></b> </ItemTemplate>

Jun 19 '06 #1
0 842

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Kunkel | last post: by
3 posts views Thread by Professor Frink | last post: by
1 post views Thread by Salvador Ponticelli | last post: by
7 posts views Thread by Chuck Hartman | last post: by
reply views Thread by Colmeister | last post: by
5 posts views Thread by Simon Tamman {Uchiha Jax} | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.