سلام دوست عزیز. کاری که گفتین رو انجام دادم. ولی باز همون مشکل وجود داره. با این دستور مشکل داره:
oled_dataadaptr.Update(oled_datatable);
این هم خطا یی که میده:
System.InvalidOperationException was unhandled by user code
Message="Update requires a valid InsertCommand when passed DataRow collection with new rows."
Source="System.Data"
StackTrace:
at System.Data.Common.DbDataAdapter.UpdatedRowStatusE rrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.UpdatedRowStatus( RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.UpdateFromDataTab le(DataTable dataTable, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at _Default.Button1_Click(Object sender, EventArgs e) in c:\Users\Mohammad\Documents\Visual Studio 2008\WebSites\WebSite3\Default.aspx.cs:line 46
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException: