473,508 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Befuddled

Not sure if this is the correct place for this question, but I'm kind of
grasping for straws at this point.

I get an error message when deleting rows from a table in Access database.
The original vb.net code is included below. It is running in an Asp.Net
structure.

My understanding is that the error message relates to the sharing of the
Inetpub and the wwwroot directories. I have set the Sharing Property to
"Share this file"and Permissions have been set to "Full Control". I still
get the error.

I'm running Microsoft Windows XP, Professional, Version 2002, Service Pack 1.

The code is as follows and the error message is after it.
***************** Start Code ********************
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.Oledb" %>

Sub Page_Load(Sender as object, e as EventArgs)
if not isPostBack then

Dim Con As OleDbConnection = New OleDbConnection
Dim DA As OleDbDataAdapter = New OleDbDataAdapter
Dim ConnectString, delCmd, x as String

x = Server.Mappath("\ASPClass\FinalProj\DB.mdb")

ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & x

Con.ConnectionString = ConnectString
delCmd = "DELETE FROM ORDERS"

DA.DeleteCommand = New OleDbCommand(delCmd, Con)
Con.Open
DA.DeleteCommand.ExecuteNonQuery()

end if
End Sub
******************** End Code ********************

******************** Start Error Message *****************
Server Error in '/' Application.
--------------------------------------------------------------------------------

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 29: DA.DeleteCommand = New OleDbCommand(delCmd, Con)
Line 30: Con.Open
Line 31: DA.DeleteCommand.ExecuteNonQuery()
Line 32: '************************************
Line 33: end if
Source File: c:\inetpub\wwwroot\ASPClass\FinalProj\ShopSignIn.a spx Line:
31

Stack Trace:
[OleDbException (0x80004005): Could not delete from specified tables.]
System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32 hr)
+41

System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
dbParams, Object& executeResult) +154
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
+92
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior,
Object& executeResult) +65
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method) +112
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +54
ASP.ShopSignIn_aspx.Page_Load(Object Sender, EventArgs e) in
c:\inetpub\wwwroot\ASPClass\FinalProj\ShopSignIn.a spx:31
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +742
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.6018; ASP.NET
Version:1.0.3705.6018

******************** End Error Message *********************
Thank you for your help.

Mark

Nov 21 '05 #1
0 836

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
11750
by: Phil Powell | last post by:
$fbArray = array($feedbackCategoryArray => $feedbackCategoryArray); I can't begin to fathom in my befuddled mind how to sort this array $fbArray into alphabetical order according to...
2
1499
by: Befuddled | last post by:
Forgive me, this is probably a very simple problem, but it's new to me. When I attempt to make php 4.3.8, it exits, and I believe the relevant message is: libtool: link: cannot find the library...
10
3207
by: Ian Rastall | last post by:
I would like to use an include for my header and navigation, and because subsequent files may be in different directories, I want to use a dynamic relative link for the images, sort of like: ...
4
1914
by: John | last post by:
Hello. I am just wondering if someone can help me with my PHP/MySql code as I am not too proficient with it yet. What I am wanting to do, is display data from two tables. The first table is...
2
2734
by: Avi Kak | last post by:
Hello: I'd be most grateful if someone could answer the following questions about the exec functions in the os module. 1) How does one get one of the os.exec functions in Python to execute a...
46
11921
by: Ioannis Vranos | last post by:
#include <iostream> int main() { using namespace std; cout<<"Best wishes for a Great Happy New Year to all!"<<endl; }
6
1530
by: puzzlecracker | last post by:
I have recently decided to go over the questions in the classical book by Murray and few of them admittedly befuddled me. page 140: 1. Under what circumstances should a smart compiler be able...
3
290
by: tomrector | last post by:
I have been working on a CSV export of a query, my problem is that I need a header row like in a Report. Any guidance would truly be appreciated........ :) My query provides:...
7
6693
geolemon
by: geolemon | last post by:
I'm getting an error, I'm not seeing the cause: Debug highlights this segment of code (I just snipped a portion here): strProc = "Insert into Parts (MfgPN, Manufacturer, Description)" & _ ...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7034
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.