StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


««12

XML to BOExpand / Collapse
Author
Message
Posted 08/25/2006 11:10:49 AM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced 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()
Post #2474
Posted 08/25/2006 11:13:08 AM


StrataFrame Developer

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.

Post #2475
Posted 08/25/2006 11:20:50 AM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced 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.
Post #2476
Posted 08/25/2006 11:23:46 AM


StrataFrame Developer

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()

Post #2477
« Prev Topic | Next Topic »

««12

Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 7:27pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 8 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.