Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI.
Can any one tell me about
Error :
Operation must use an updateable query.

I have Wrote an Online registration application, Which will accept a photo from user and upload it to server,
and also insert into database..

it is working fine on local host. I have been using it long time.
But when i have uploaded it on server, It Flashes above error..

If any one want to check it online can go to aca.edu.in and click on online registration...

Stack Trace :



Line 415:
Line 416: // Update data source
Line 417: dbAdapt.Update(dbSet, "Student_Photo_M");
Line 418:
Line 419: // Get newFileID

Source File: c:\inetpub\vhosts\aca.edu.in\httpdocs\Student_Reg.aspx.cs Line: 417

Stack Trace:


[OleDbException (0x80004005): Operation must use an updateable query.]
System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +1455816
System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +41
System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) +2037
System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping) +40
System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable) +183
Student_Reg.WriteToDB(String strName, String strType, Byte[]& Buffer) in c:\inetpub\vhosts\aca.edu.in\httpdocs\Student_Reg.aspx.cs:417
Student_Reg.Button1_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\aca.edu.in\httpdocs\Student_Reg.aspx.cs:124
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


Help will be appreciated... :)
Posted

1 solution

This error normally occurs when database folder doesn’t have necessary security permissions to write to the database file created by Microsoft Access when opening the database.

Check your security setting on the folder where your database exists.

You can find detail on this here[^]
 
Share this answer
 

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