473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
E_FAIL(0x80004005)
<%@ 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
Source=e:\web\mydomain\htdocs\db\mydbase.mdb;"

Dim Conn as new OleDbConnection(strConn)
Dim strSQL as string ="SELECT lid,name FROM local"
Dim Cmd as New OleDbCommand(strSQL,Conn)
Conn.Open()
dim cy
cy.DataSource = Cmd.ExecuteReader()
cy.DataBind()
Conn.close()
End Sub
</script>
<html><head>
<title>show-local2</title>
</head>
<form runat="server">
<body bgcolor="#FFFFFF">
<asp:DataList id="cy" runat="server"
RepeatColumns="1" RepeatDirection="vertical"
CellSpacing="3">
<ItemTemplate><b>

</b> <b><a href=#<%#
String.Format("{0}",Container.DataItem("lid"))%>>
<%# Container.DataItem("name")%>
</a></b> </ItemTemplate>
</ASP:Datalist>
</form>
</body></html>
????
chumley

Jun 19 '06 #1
0 923

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rafael | last post by:
Hi, I hope I can find some help for this problem IDE: Visual Studio.NET 2003 Developer Editio Language: C# Problem: "An unhandled exception of type 'System.NullReferenceException' occurred in...
3
by: Kunkel | last post by:
i am using VS.NET 2003 and coding in VB.NET. some of my users recieving an unhandled exception in one of my programs. although these exceptions always occur during a certain process, they are...
3
by: Professor Frink | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
1
by: Salvador Ponticelli | last post by:
In an ASP.NET Application I have an instance of a remoting object. After the instance was created, I saved it in a Session variable. When I try to use this instance with the Remoting Service down,...
9
by: RalphTheExpert | last post by:
I'm getting different behavior if my code is running under the debugger or not. I have modified Winmain to look like this: // Copyright (C) 2002 Microsoft Corporation // All rights reserved....
1
by: Pardhasaradhy | last post by:
Hi, Please see the following error and revert back as early as possible. I am getting this once I request for the asp.net page. Server Error in '/tanishq' Application. Timed out waiting for...
4
by: Craig831 | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
0
by: Colmeister | last post by:
I recently read Jason Clark's excellent article on Unhandled Exceptions (http://msdn.microsoft.com/msdnmag/issues/04/06/NET/default.aspx) and have attempted to incorporate the features he talks...
5
by: Simon Tamman {Uchiha Jax} | last post by:
Now this is bugging me. I just released software for a client and they have reported an unhandled stack overflow exception. My first concern is that the entirity of the UI and any threaded...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.