Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 1.0
This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 11th, 2004, 06:05 PM
Registered User
 
Join Date: Feb 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to frogfur
Default Chapter 2 datacontrol.aspx

I am trying to get this thing working.

I had to change the path because it is different on my machine, but here is the code that I have.

<% @Import Namespace="System.Data" %>
<% @Import Namespace="System.Data.OleDb" %>
<%@ Page Language="vb" Debug="true" %>

<script language="vb" runat = "server">

Sub Page_Load(Sender as Object, E as EventArgs)

    Dim objConnection As OleDbConnection
    Dim objCommand As OleDbDataAdapter
    Dim strConnect As String
    Dim StrCommand As String
    Dim DataSet1 As New DataSet

    strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;"
    strConnect += "C:\Program Files\Microsoft.NET\SDK\v1.1\QuickStart\aspplus\sa mples\grocertogo\data"
    strConnect += "\grocertogo.mdb;"
    strConnect += "Persist Security Info=False"

    strCommand = "SELECT ProductName, UnitPrice FROM products"
    objConnection = New OleDbConnection(strConnect)
    objCommand = New OleDbDataAdapter(strCommand, objConnection)
    objCommand.Fill(DataSet1,"products")
    DataGrid1.DataSource=DataSet1.Tables("Products").D efaultView
    DataGrid1.DataBind()
End Sub

</script>
<html>
<head>
<title>Data Grid Control example</title>
</head>
<body>
<asp:DataGrid id="DataGrid1" runat="server" />
</body>
</html>

When I try to load the page, I get this message:

Could not find installable ISAM.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Could not find installable ISAM.

Source Error:


Line 21: objConnection = New OleDbConnection(strConnect)
Line 22: objCommand = New OleDbDataAdapter(strCommand, objConnection)
Line 23: objCommand.Fill(DataSet1,"products")
Line 24: DataGrid1.DataSource=DataSet1.Tables("Products").D efaultView
Line 25: DataGrid1.DataBind()


Source File: C:\BegASPNET\Ch02\groceries.aspx Line: 23

I am using
Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET Version:1.1.4322.573

Any Ideas how I can fix this problem


 
Old March 19th, 2005, 12:59 PM
Authorized User
 
Join Date: May 2004
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Of course we can see what Microsoft says:
http://support.microsoft.com/default...b;en-us;209805

But most times it seldom gives us any help and I find the reasons usually are the two points below:

1. The connecting string was wrong.So if you meet this error,check your connection string first.The correct connection string is like this:Â Â strconnection="provider=microsoft.ole db.jet.4.0;data source=Server.MapPath";

Example:Â Â Â
  strConnect =  @"Provider=Microsoft.Jet.OLEDB.4.0;";
  strConnect += @"Data Source=F:\BegASPNET\Ch02\grocertogo.mdb;";
  strConnect += "Persist Security Info=False";
You can get more details of connection string from here:
http://www.connectionstrings.com/

2. The system could not find the driver of the database,so install the driver,such as MDAC 2.7 OR 2.8 、ODBC .NET Data Provider.

niuwei





Similar Threads
Thread Thread Starter Forum Replies Last Post
datacontrol.aspx example problem wendyhod ASP.NET 1.0 and 1.1 Basics 0 May 4th, 2005 09:48 AM
Problem with CH02 datacontrol.aspx Nikon BOOK: Beginning ASP.NET 1.0 1 October 25th, 2004 02:13 AM
Chapte2 DataControl.aspx frogfur BOOK: ASP.NET Website Programming Problem-Design-Solution 0 February 11th, 2004 05:09 PM
Chapter 1. Punctual.aspx dad62896 BOOK: Beginning ASP.NET 1.0 9 January 27th, 2004 01:11 PM
Problem running datacontrol.aspx in Chapter 2 andersond BOOK: Beginning ASP.NET 1.0 5 October 29th, 2003 07:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.