PDA

View Full Version : مقاله: درج در پایگاه داده - درخواست کمک فوری



hossein_moghimi
دوشنبه 04 خرداد 1388, 15:26 عصر
با سلام.
یه سایت نوشتم .روی سیستم خودم که تست میکنم مشکلی نداره.
ولی وقتی میذارم روی سرور هر صفحه که میخواد چیزی توی پایگاه داده بنویسه خطا :گریه:میده.
ولی هنگام خواندن مشکلی نداره.
فکر میکنم سایت اجازه نوشتن توی پایگاه داده رو نداره ( تنظیمات داخل web.config که من انجام ندادم)
اگه امکان داره کمک کنید.
متن خطا رو برای یکی از صفحات میذارم :



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 26: return;Line 27: }Line 28: AccessDataSource1.Insert();Line 29: Server.Transfer("Ticket.aspx");Line 30: }
Source File: c:\inetpub\vhosts\marefat-khaf.com\httpdocs\Ticket.aspx.cs Line: 28

Stack Trace:

[OleDbException (0x80004005): Operation must use an updateable query.] System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS dbParams, Object& executeResult) +267 System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult) +192 System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior, Object& executeResult) +48 System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior behavior, String method) +106 System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +108 System.Web.UI.WebControls.SqlDataSourceView.Execut eDbCommand(DbCommand command, DataSourceOperation operation) +404 System.Web.UI.WebControls.SqlDataSourceView.Execut eInsert(IDictionary values) +447 System.Web.UI.WebControls.SqlDataSource.Insert() +13 Ticket.Button1_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\marefat-khaf.com\httpdocs\Ticket.aspx.cs:28 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +107 System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean

milade
دوشنبه 04 خرداد 1388, 16:11 عصر
سلام دوست عزیز

فولدر و یا بانک مورد نظر پرمشین Write رو نداره

پرمشین رو براش ست کن

موفق باشی

mskarimi
دوشنبه 04 خرداد 1388, 16:16 عصر
به پوشه APP_DATA مجوز FUllControl براي يوزر NetworkService بدين