Hi. I am trying to add a new row to access database but i am getting an error. Could someone help me please? Thanks.
Here is the ASP Codes:
<snip> See correct code in the next post
Here is the error message i am getting:
Syntax error in INSERT INTO statement.
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: Syntax error in INSERT INTO statement.
Source Error:
Line 29: ClassyDS.Tables("Ads").Rows.Add(Row)
Line 30:
Line 31: Adapter.Update(ClassyDS, "Ads")
Line 32:
Line 33: If ClassyDS.HasErrors Then
Source File: C:\MemberSites\MemberSites_AspSPider_Net\aant2010\webroot\placead.aspx Line: 31
Stack Trace:
[OleDbException (0x80040e14): Syntax error in INSERT INTO statement.]
System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +1437055
System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +45
System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) +2001
System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping) +41
System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable) +176
ASP.placead_aspx.Submit_Click(Object Sender, EventArgs E) in C:\MemberSites\MemberSites_AspSPider_Net\aant2010\webroot\placead.aspx:31
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
[edited by: marcel at 4:56 pm (utc) on May 28, 2010]