Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 6th, 2011, 06:19 AM
Registered User
Join Date: Aug 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Accessing an online Access database with ASP.NET

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
  #2 (permalink)  
Old August 6th, 2011, 07:05 AM
Registered User
Join Date: Aug 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Hi again, I figured it out. It turns out only 1 of my online folders had the write permission. Hence, i couldn't insert/delete in the others but only read. I moved the db to the folder with the write permission, edited the connection string accordingly and it started working.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CR XI Access System database in asp.net 2.0 rturner003 ASP.NET 2.0 Professional 0 October 22nd, 2007 09:50 AM
asp.net 2 accessing sql database code problem... minstrel ASP.NET 2.0 Basics 1 August 31st, 2006 11:40 PM
problem Accessing Access Database using JavaScript kumar_siva Javascript How-To 3 February 8th, 2006 01:45 PM
Database connection error. asp.net/dreamw/access peacesquid Classic ASP Databases 1 July 28th, 2005 06:56 PM

All times are GMT -4. The time now is 09:42 PM.

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