Saving business object using Oracle database


Author
Message
winp
winp
StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)
Group: Forum Members
Posts: 4, Visits: 5
I'm trying to add a new record in my business object and try to save it to oracle database table.  I have an error "Missing expression". 

I tried two ways, both of which give me the same error:

1.  I used the Strataframe Maintenance Toolstrip Save method.

2. I have custom code as follows:

            AreaBO areaBO = this.GetAreas(); // This return all records from the database

            DataTable dataTable = areaBO.CurrentDataTable;
            DataColumn[] dataColumn = new DataColumn[1];
            dataColumn[0] = dataTable.Columns["AREAID"];
            dataTable.PrimaryKey = dataColumn;

            DataRow dataRow = null;
            dataRow = dataTable.NewRow();
            dataRow["ID"] = 955;  // hardcoded for now.  it will eventually be dynamic
            dataRow["Location"] = "test";
            dataRow["IsActive"] = 1;
           
            dataTable.Rows.Add(dataRow);

            if (areaBO.IsDirty)
            {
               areaBO.Save();

            }

What am I doing wrong?

Thanks.

Replies
winp
winp
StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)
Group: Forum Members
Posts: 4, Visits: 5
Trent:

I placed the code as you suggested.  And I received the following in the debug.html.  (I erased the connection string from being displayed for security reason.)  Please advice on why the "Missing Expression" error is occuring on adding records to oracle database.

Thanks.


Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
It looks like your command #3.  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.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search