vincentw56
IS-IT--Management
I am working on converting an ASP page to ASP.NET. The problem is that I keep getting a Security Exception error. I guess this has to do with the Access database, but it works fine with the ASP code. I even used some code I found on here to see if it would work. Got the same thing. The code is posted below. The website is hosted on a 3rd party server. Any help would be appreciated.
The website page is:
Code:
<%@ Page Language="vb" Debug="True"%>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.OleDb" %>
<script runat="server">
Sub Page_Load (Source As Object, E As EventArgs)
Dim strConnection As String = "Provider=Microsoft.Jet.OleDb.4.0;data source=e:\InetPub\Clients\kmwgamezone.com\fpdb\DVDGameAppList.mdb"
Dim ojbConnection As New OleDbConnection(strConnection)
Dim strSQL As String = "SELECT * FROM tblMain"
Dim ojbCommand As New OleDBCommand(strSQL, ojbConnection)
ojbConnection.Open()
dgNameList.DataSource = ojbCommand.ExecuteReader()
dgNameList.DataBind()
ojbConnection.Close()
End Sub
</script>
<html>
<head>
</head>
<body>
<asp:DataGrid id="dgNameList" runat="server" />
</body>
</html>
The website page is: