﻿<?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?)  » Saving business object using Oracle database</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 00:58:00 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Saving business object using Oracle database</title><link>http://forum.strataframe.net/FindPost9924.aspx</link><description>Hehe, I'm glad you figured it out.&amp;nbsp; :)</description><pubDate>Tue, 03 Jul 2007 08:54:27 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>Saving business object using Oracle database</title><link>http://forum.strataframe.net/FindPost7593.aspx</link><description>I'm trying to add a new record in my business object and try to save it to oracle database table.&amp;nbsp; I have an error "Missing expression".&amp;nbsp; &lt;/P&gt;&lt;P&gt;I tried two ways, both of which give me the same error: &lt;/P&gt;&lt;P&gt;1.&amp;nbsp; I used the Strataframe Maintenance Toolstrip Save method.&lt;/P&gt;&lt;P&gt;2. I have custom code as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AreaBO areaBO = this.GetAreas(); // This return all records from the database&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataTable dataTable = areaBO.CurrentDataTable;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataColumn[] dataColumn = new DataColumn[1];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataColumn[0] = dataTable.Columns["AREAID"];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataTable.PrimaryKey = dataColumn;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataRow dataRow = null;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataRow = dataTable.NewRow();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataRow["ID"] = 955;&amp;nbsp; // hardcoded for now.&amp;nbsp; it will eventually be dynamic&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataRow["Location"] = "test";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataRow["IsActive"] = 1;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dataTable.Rows.Add(dataRow);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (areaBO.IsDirty)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;areaBO.Save();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;Thanks.</description><pubDate>Tue, 03 Jul 2007 08:54:27 GMT</pubDate><dc:creator>winp</dc:creator></item><item><title>RE: Saving business object using Oracle database</title><link>http://forum.strataframe.net/FindPost9908.aspx</link><description>Hi, &lt;/P&gt;&lt;P&gt;found the problem. The BO was in a parent/child relationship and the Sequence of the parent BO was empty. So I was looking at the wrong BO to figure out what was wrong ;) Now it works fine. Sorry for the unnecessary post.</description><pubDate>Mon, 02 Jul 2007 11:29:57 GMT</pubDate><dc:creator>Bastian Töpfer</dc:creator></item><item><title>RE: Saving business object using Oracle database</title><link>http://forum.strataframe.net/FindPost9898.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;the Debug file looks like the one posted earlier. I even tried it without the schema -&amp;gt; same result:&lt;/P&gt;&lt;P&gt;&lt;TABLE cellSpacing=0&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class=RowHeader&gt;Command #: &lt;/TD&gt;&lt;TD&gt;4 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class=RowHeader&gt;Timestamp: &lt;/TD&gt;&lt;TD&gt;2007-07-02 16:30:03.171 &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class=TitleSpacer colSpan=2&gt;General Command Settings &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class=RowHeader&gt;Command Type: &lt;/TD&gt;&lt;TD&gt;Text &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class=RowHeader&gt;Object Type: &lt;/TD&gt;&lt;TD&gt;System.Data.OracleClient.OracleCommand &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class=RowHeader&gt;Connection String: &lt;/TD&gt;&lt;TD&gt;Data Source=OPTPRD2;User Id=CUSTRQ;Integrated Security=no; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class=RowHeader&gt;Transaction: &lt;/TD&gt;&lt;TD&gt;False &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class=Title colSpan=2&gt;Command Settings &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class=RowHeader&gt;CommandText: &lt;/TD&gt;&lt;TD&gt;SELECT .NEXTVAL FROM DUAL &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class=Title colSpan=2&gt;Command Parameters &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class=RowHeader&gt;N/A &lt;/TD&gt;&lt;TD&gt;No parameters are defined &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description><pubDate>Mon, 02 Jul 2007 09:32:16 GMT</pubDate><dc:creator>Bastian Töpfer</dc:creator></item><item><title>RE: Saving business object using Oracle database</title><link>http://forum.strataframe.net/FindPost9896.aspx</link><description>Can you put the data source in Debug and post the results?&amp;nbsp; You can put the following line of code at the bottom of the SetDataSources() method to put it in debug:&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;MicroFour.StrataFrame.Data.DataBasics.DataSources(0).SetDebugOn(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"c:\MyDebugOutput.html"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;True&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;However, as some insight, the data source tries place the sequence name in quotes when executing it.&amp;nbsp; So, if you specify the full name to the sequence, like Schema.Sequence, then the data source will try to put that in quotes like this: "Schema.Sequence" which will throw it off (since it needs to be "Schema"."Sequence").&amp;nbsp; So, put it in debug and we'll see what it's trying to produce.&lt;/FONT&gt;</description><pubDate>Mon, 02 Jul 2007 09:20:35 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Saving business object using Oracle database</title><link>http://forum.strataframe.net/FindPost9887.aspx</link><description>Hi, &lt;/P&gt;&lt;P&gt;i receive the same error. And it's not me that sends this sql-command. It must be something that&amp;nbsp; strataframe is sending. &lt;/P&gt;&lt;P&gt;I set BO.OracleSequence to an existing sequence schema.sequencename and the property InsertUsingStoredProcedure is set to false. &lt;/P&gt;&lt;P&gt;Why is the BO not using the specified sequence, but sends rather sends this incorrect command? &lt;/P&gt;&lt;P&gt;Thanks for your help</description><pubDate>Mon, 02 Jul 2007 09:05:10 GMT</pubDate><dc:creator>Bastian Töpfer</dc:creator></item><item><title>RE: Saving business object using Oracle database</title><link>http://forum.strataframe.net/FindPost7650.aspx</link><description>It looks like your command #3.&amp;nbsp; There is a "." in front of the NextVal field...I know this would fail on any other ANSI SQL platform, so I assume that this is incorrect for Oracle as well.</description><pubDate>Wed, 21 Mar 2007 16:50:43 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Saving business object using Oracle database</title><link>http://forum.strataframe.net/FindPost7649.aspx</link><description>Trent:&lt;/P&gt;&lt;P&gt;I placed the code as you suggested.&amp;nbsp; And I received the following in the debug.html.&amp;nbsp; (I erased the connection string from being displayed for security reason.)&amp;nbsp; Please advice on why the "Missing Expression" error is occuring on adding records to oracle database.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/c8efa3d9-a485-4764-b18f-6465.bmp"&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/01926af3-f2a1-4996-8337-e696.bmp"&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/98dd1248-6fcc-4a51-ac71-9b71.bmp"&gt;</description><pubDate>Wed, 21 Mar 2007 16:04:37 GMT</pubDate><dc:creator>winp</dc:creator></item><item><title>RE: Saving business object using Oracle database</title><link>http://forum.strataframe.net/FindPost7595.aspx</link><description>[quote]What am I doing wrong?[/quote]&lt;/P&gt;&lt;P&gt;Well in this case, diagnosis a "Missing Expression" error is like determine how long a string should be :)&lt;/P&gt;&lt;P&gt;Turn on data debugging which will write all of the QUERIES and COMMANDs to an HTML file which will let you see exactly what is going back to the server.&amp;nbsp; There is no way for us to diagnose data related problems without the debug information.&lt;/P&gt;&lt;P&gt;In the Appmain.vb or program.cs file, turn on data&amp;nbsp;debugging after the data source has been created.&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;MicroFour.StrataFrame.Data.DataBasics.DataSources(0).SetDebugOn(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"c:\MyDebugOutput.html"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;True&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]</description><pubDate>Mon, 19 Mar 2007 15:48:24 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>