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