| | | 
Advanced StrataFrame User
       
Group: StrataFrame Users Last Login: Today @ 7:09:05 PM Posts: 617, Visits: 18,124 |
| great, sorry I missed that 2nd parameter.
Now why isnt the save committing the records back to the SQL server?
OrdersBO.CopyDataFrom(importedorder_datatable, MicroFour.StrataFrame.Business.BusinessCloneDataType.AppendDataToTableFromCompleteTable)
OrdersBO.Save()
I see them added, but they dont get saved.. is there something special about using CopyDataFrom?
If I manually do it, it does save.
Me.OrdersBO.newRow()
Me.OrdersBO.order_dt = DateTime.Parse(currow("order_ndt"))
Me.OrdersBO.Save() |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 10:49:29 PM Posts: 4,379, Visits: 4,412 |
| I see them added, but they dont get saved.. is there something special about using CopyDataFrom? When you copy the data in the CurrentDataTable rejects any previous changes. If you look at the .IsDirty property before and after the copy, you will see that it will be False after the copy. |
| | | | 
Advanced StrataFrame User
       
Group: StrataFrame Users Last Login: Today @ 7:09:05 PM Posts: 617, Visits: 18,124 |
| How do I save the BO with my newly added records then?
I tried putting it in edit mode, the save() then causes a collision. |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 10:49:29 PM Posts: 4,379, Visits: 4,412 |
| | If all of those rows need to be set to dirty, the you can manually set each of those rows into a dirty state. Me.CurrentDataTable.Rows(0).SetModified() This will tell the BO that this record needs to be updated. If it is a new record then use this method: Me.CurrentDataTable.Rows(0).SetAdded() |
| |
|
|