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.
MicroFour.StrataFrame.Data.DataBasics.DataSources(0).SetDebugOn(
However, as some insight, the data source tries place the sequence name in quotes when executing it. 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"). So, put it in debug and we'll see what it's trying to produce.