Click here to Skip to main content
16,020,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HTML
Server Error in '/' Application.
Operation must use an updateable query.
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: Operation must use an updateable query.

Source Error:

Line 29:         cmd.Parameters.AddWithValue("Subject", subtext.Text);
Line 30:         cmd.Parameters.AddWithValue("Enquiry", enqtext.Text);
Line 31:         cmd.ExecuteNonQuery();
Line 32:         cn.Close();
Line 33:         Label2.Text = "Query Sent Thanks Will Response Shortly";


Source File: c:\inetpub\vhosts\sstscorp.com\httpdocs\contact.aspx.cs    Line: 31

Stack Trace:

[OleDbException (0x80004005): Operation must use an updateable query.]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +267
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +192
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +48
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +106
   System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +108
   contact.Button1_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\sstscorp.com\httpdocs\contact.aspx.cs:31
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

/// i had tried all read and write rights to the directory containing my ms access data base.. plz help..
Posted
Updated 12-Nov-11 9:16am
v2

 
Share this answer
 
Comments
harsh_deep 12-Nov-11 15:33pm    
:( i had un checked it den uploaded again..but still same problem.. :(
harsh_deep 9-Dec-11 8:40am    
thanks
Operation must use an updateable query

This error comes because you don't have write permission for the folder where you have put mdb file.

Give the appropriate permission and try again.
 
Share this answer
 
v2
Comments
harsh_deep 13-Nov-11 11:23am    
i had tried this.. i enabled full control right for this folder.. still it giving problem..i dnt knw whats wrong with this...
harsh_deep 9-Dec-11 8:40am    
thanks a lot
This error usually comes when you haven't provided permissions to the folder in which u have stored your database. Give permission to the database folder.
 
Share this answer
 
v2
Comments
harsh_deep 13-Nov-11 11:23am    
i had tried this.. i enabled full control right for this folder.. still it giving problem..i dnt knw whats wrong with this...
harsh_deep 9-Dec-11 8:40am    
thanks a lot
this error occurs because you have no permission in this folder App_Data
go hosting control panel and enable full control right for this fodder. if you want upload file such as image in the folder images in host you must get right for this.
 
Share this answer
 
Comments
harsh_deep 13-Nov-11 11:23am    
i had tried this.. i enabled full control right for this folder.. still it giving problem..i dnt knw whats wrong with this...
harsh_deep 9-Dec-11 8:40am    
thanks a lot...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900