Hi all, I hope this is the right forum to place this.
I'm new to ASP.Net, I have created an ASP.Net Website using Visual Studio 2010. The website accesses a Microsoft Access database to delete, select and insert information. It works fine when it runs on my PC. However, some problems occur when I host it online. When the website loads, it immediately has to delete any entries in a certain table; however this error message appears:
Could not delete from specified tables.
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 delete from specified tables.
Source Error:
Line 113: Dim deleteQTableSQL As String = "DELETE * From QuestionsAsked"
Line 114: Dim deleteCMD As New OleDbCommand(deleteQTableSQL, CAToleDbConn)
Line 115: deleteCMD.ExecuteNonQuery()
Line 116: End Sub
Line 117:
Source File: c:\inetpub\wwwroot\ap04aaa\CatTest.aspx.vb Line: 115
Stack Trace:
[OleDbException (0x80004005): Could not delete from specified tables.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(OleDbHResult hr) +1080348
System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS dbParams, Object& executeResult) +247
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult) +194
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior, Object& executeResult) +58
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior behavior, String method) +167
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
CatTest.deleteQTable() in c:\inetpub\wwwroot\ap04aaa\CatTest.aspx.vb:115
CatTest.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\ap04aaa\CatTest.aspx.vb:9
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
The connection string I used to access the database is:
<add name="CATCS" connectionString="Provider=Microsoft.ACE.OLEDB.12. 0;Data Source=|DataDirectory|\CATDB.accdb;" providerName="System.Data.OleDb"/>
Does anyone know what I doing wrong? I went through a guide to ensure that my folders are configured with IIS to ensure that there are enough permissions. I am able to run a hosted website that doesn't contain a database fine, but the above error message appears with my website that uses an Access database.
Thanks in advance