Juan,
I tried the path, which did not work.
I tried the physical path, but it is still looking on my c drive instead of
the server.
Here is the error message and the code follows. Can you tell my what is my
problem?
'c:\windows\system32\inetsrv\
www.wheelers.com\fpbd\Acc.mdb' is not a valid
path. Make sure that the path name is spelled correctly and that you are
connected to the server on which the file resides.
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:
'c:\windows\system32\inetsrv\
www.wheelers.com\fpbd\Acc.mdb' is not a valid
path. Make sure that the path name is spelled correctly and that you are
connected to the server on which the file resides.
Source Error:
Line 6: Dim DBConnection As OledbConnection
Line 7: DBConnection = New
OledbConnection("Provider=Microsoft.Jet.Oledb.4.0;Data
Source=
www.wheelers.com\fpbd\Acc.mdb")
Line 8: DBConnection.Open()
Line 9:
Line 10: Dim DBCommand As OledbCommand
Source File: e:\accounts\whee13\WWW\database_acc_host.aspx Line: 8
Stack Trace:
[OleDbException (0x80004005):
'c:\windows\system32\inetsrv\
www.wheelers.com\fpbd\Acc.mdb' is not a valid
path. Make sure that the path name is spelled correctly and that you are
connected to the server on which the file resides.]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvider() +57
System.Data.OleDb.OleDbConnection.Open() +203
ASP.database_Acc_host_aspx.Page_Load(Object sender, EventArgs e) in
e:\accounts\whee13\WWW\database_acc_host.aspx:8
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="System.Data.Oledb" %>
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim DBConnection As OledbConnection
DBConnection = New OledbConnection("Provider=Microsoft.Jet.Oledb.4.0;Data
Source=
www.wheelers.com\fpbd\Acc.mdb")
DBConnection.Open()
Dim DBCommand As OledbCommand
DBCommand = New OledbCommand("SELECT * FROM table1, Acc")
Dim SQLString AS String
SQLString = "SELECT * FROM Table1"
DBCommand = New OleDBCommand(SQLString, DBConnection)
Dim DBReader AS OledbDatareader
DBReader = DBCommand.ExecuteReader()
MyDataGrid.DataSource = DBReader
MyDataGrid.DataBind()
DBReader.Close()
DBConnection.Close()
End Sub
</script>
</head>
<body>
<form id="form1" runat="server">
<asp
ataGrid id="MyDataGrid" runat="server"/>
</form>
</body>
</html>