﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Problem with Access DB Insert</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 10:38:41 GMT</lastBuildDate><ttl>20</ttl><item><title>Problem with Access DB Insert</title><link>http://forum.strataframe.net/FindPost765.aspx</link><description>Hello,&lt;/P&gt;&lt;P&gt;I have a BO setup for an Access table. I've bound the textboxes' data field in a maintenence form. All looks good.&lt;/P&gt;&lt;P&gt;After starting the program, I click "New" edit all the fields. If I click on "Save", I get this error:&lt;/P&gt;&lt;P&gt;BusinessLayerException&lt;BR&gt;&amp;nbsp;An error occurred while saving an the data to the server.&lt;BR&gt;DataLayerSavingException&lt;BR&gt;&amp;nbsp;Syntax error in INSERT INTO statement.&lt;BR&gt;OleDbException&lt;BR&gt;&amp;nbsp;Syntax error in INSERT INTO statement.&lt;/P&gt;&lt;P&gt;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : MicroFour StrataFrame Business&lt;/P&gt;&lt;P&gt;Stack Trace: &lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object&amp;amp; executeResult)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object&amp;amp; executeResult)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object&amp;amp; executeResult)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.AccessDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DataLayer.UpdateDataTableThread(Object ThreadParams)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DataLayer.SaveByForm(DataTable TableToSave, Boolean Transactional, String TransactionKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.SaveByForm(Boolean Transactional, String TransactionKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save(Boolean Transactional, String TransactionKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.cmdSave_Click(Object sender, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStrip.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;BR&gt;&lt;/P&gt;&lt;P&gt;And I cannot save the record. I'm not sure what I'm doing wrong. Any ideas?</description><pubDate>Sat, 08 Apr 2006 12:57:38 GMT</pubDate><dc:creator>Kevin Lingofelter</dc:creator></item><item><title>RE: Problem with Access DB Insert</title><link>http://forum.strataframe.net/FindPost795.aspx</link><description>We already add the brackets for you.&amp;nbsp; If you open the YourBO.Designer.vb (or .cs) file and go down to where the properties are defined, you can see that we use brakets to prevent any conflicts with reserved words.&amp;nbsp; This will only resolve the conflicts with .NET reserved words though and you can still have problems on the side of the database.&amp;nbsp; Glad that you figured it out!:D</description><pubDate>Sat, 08 Apr 2006 12:57:38 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Problem with Access DB Insert</title><link>http://forum.strataframe.net/FindPost792.aspx</link><description>Ok...I figured it out!! I had a field named "LongText". This happens to be a reserved word, but Access allows it's use (the program I'm putting together is a port from an existing Access app).&lt;/P&gt;&lt;P&gt;For the time being, I've renamed the field, so everything is working ok on my end now. Just curious, when Access is specified in the connection, does the BO surround the field names and tables&amp;nbsp;in brackets when building the SQL? If not, adding them may keep this from happening.&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Sat, 08 Apr 2006 10:47:35 GMT</pubDate><dc:creator>Kevin Lingofelter</dc:creator></item><item><title>RE: Problem with Access DB Insert</title><link>http://forum.strataframe.net/FindPost788.aspx</link><description>Yes. I created a simple FillAll method (select * from blah). The BO populates and I can navigate through the records, but I cannot update or insert a record. It must have something to do with schema of this table because I don't have any problems with other tables in the database. &lt;/P&gt;&lt;P&gt;I'm curious...shouldn't the debug window show the SQL used to update the&amp;nbsp;table before it's executed? It would probably help track down the problem. This one is a stumper!&lt;/P&gt;&lt;P&gt;BTW...I downloaded the 4/6/2006 PR. Is there any change notes on this version?&lt;/P&gt;&lt;P&gt;Thanks!</description><pubDate>Sat, 08 Apr 2006 00:25:06 GMT</pubDate><dc:creator>Kevin Lingofelter</dc:creator></item><item><title>RE: Problem with Access DB Insert</title><link>http://forum.strataframe.net/FindPost787.aspx</link><description>Kevin,&lt;/P&gt;&lt;P&gt;Can you populate the business object from the Access database and navigate through some records?&amp;nbsp; If so, can you edit an existing record, make a change, and save?</description><pubDate>Fri, 07 Apr 2006 19:41:40 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Problem with Access DB Insert</title><link>http://forum.strataframe.net/FindPost782.aspx</link><description>Ok..I've added the code and I am getting the SQL debug window during the data retrieval methods, however, when I try to save a record, the error comes up, but no debug &amp;#119;indow.</description><pubDate>Fri, 07 Apr 2006 10:22:33 GMT</pubDate><dc:creator>Kevin Lingofelter</dc:creator></item><item><title>RE: Problem with Access DB Insert</title><link>http://forum.strataframe.net/FindPost781.aspx</link><description>You can turn on a debug mode for each data connection independently in your application.&amp;nbsp; So if you only have a single data connection the code below is exactly what you can enter.&amp;nbsp; This code should be added after the SetConnections() method call in your AppMain.vb or Program.cs class.&amp;nbsp; If you are manually specifying the connection string and not going through the Connection String Manager, then make sure your connection has been added to the DataSources collection before calling this code, otherwise...BOOM :P&lt;P&gt;MicroFour.StrataFrame.Data.DataLayer.DataSources.Item(&lt;FONT color=#800000&gt;""&lt;/FONT&gt;).DebugMode = &lt;FONT color=#0000ff&gt;True&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#1f5080&gt;Once you add this code, run your application.&amp;nbsp; All SQL statements will be brought up in a message window so you can see everything going on.&amp;nbsp; This is a good tool to debug the statements.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/0de02fbe-e962-4f01-bd01-cf88.JPG"&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;&lt;/FONT&gt;</description><pubDate>Fri, 07 Apr 2006 10:15:08 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Problem with Access DB Insert</title><link>http://forum.strataframe.net/FindPost778.aspx</link><description>Hmm..I've seem to have found this behavior again. How do I access the debug option?</description><pubDate>Thu, 06 Apr 2006 15:28:08 GMT</pubDate><dc:creator>Kevin Lingofelter</dc:creator></item><item><title>RE: Problem with Access DB Insert</title><link>http://forum.strataframe.net/FindPost774.aspx</link><description>Kevin,&lt;/P&gt;&lt;P&gt;If this happens again let me know.&amp;nbsp; In the pre-release we added a "debug" option that will show you all of the SQL commands before they are executed so you can see more clearly what is going on.&amp;nbsp; It also allows you to send it to us so we can look at it as well.&amp;nbsp; At any rate, glad you got it going. :)</description><pubDate>Thu, 06 Apr 2006 12:34:41 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Problem with Access DB Insert</title><link>http://forum.strataframe.net/FindPost768.aspx</link><description>Duh...forgot to fill the BO...:D</description><pubDate>Wed, 05 Apr 2006 19:50:14 GMT</pubDate><dc:creator>Kevin Lingofelter</dc:creator></item></channel></rss>