﻿<?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?)  » Business Object and XML with GUID types</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 08 Sep 2026 13:10:58 GMT</lastBuildDate><ttl>20</ttl><item><title>Business Object and XML with GUID types</title><link>http://forum.strataframe.net/FindPost7361.aspx</link><description>I have a BusinessObject that I need to export records and import records.&amp;nbsp; I looked through your code in your XML data source example and it seems to work great for the exporting.&amp;nbsp; The XML file looks perfect.&amp;nbsp; My problem is with the importing, I pretty much copied the code from the example and I get an error of "Failed to convert parameter value from a String to a Guid".&lt;P&gt;[codesnippet]&lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;Dim&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; loDS &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; DataSet&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loDS.ReadXml(loOpenFileDialog.FileName)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; loBusinessObject &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; MyTypedBusinessObject&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Try&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loBusinessObject.CopyDataFrom(loDS.Tables(0), MicroFour.StrataFrame.Business.BusinessCloneDataType.ClearAndFillFromCompleteTable)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;FONT size=2&gt; loBusinessObject.MoveFirst = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;True&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Then&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Do&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loBusinessObject.CurrentRow.SetAdded()&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Loop&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;While&lt;/FONT&gt;&lt;FONT size=2&gt; loBusinessObject.MoveNext()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;If&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT size=2&gt;&lt;P&gt;loBusinessObject.Save()&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;When I stop before the save, the fields that have GUID types in them, have an error of "Specified cast is not valid".&lt;/P&gt;&lt;P&gt;Do I need to write a method to copy the data from this XML file into the Businessobject converting values to the types they need to be as they get copied in, or am I missing something in the copying?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Robin Giltner</description><pubDate>Thu, 08 Mar 2007 12:37:30 GMT</pubDate><dc:creator>Robin J Giltner</dc:creator></item><item><title>RE: Business Object and XML with GUID types</title><link>http://forum.strataframe.net/FindPost7363.aspx</link><description>[quote]Are you guys just using mental projection now to cut down on forum traffic or what? ;-)[/quote]&lt;/P&gt;&lt;P&gt;Yeah...it is a new tactic we have started implementing :D&amp;nbsp; &lt;/P&gt;&lt;P&gt;Glad you found it ;)</description><pubDate>Thu, 08 Mar 2007 12:37:30 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Business Object and XML with GUID types</title><link>http://forum.strataframe.net/FindPost7362.aspx</link><description>Well, it appears that changing my CloneDataType from "&lt;FONT size=2&gt;&lt;P&gt;ClearAndFillFromCompleteTable" to "&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;AppendDataToTableFromCompleteTable" seems to have fixed my problem.&lt;/P&gt;&lt;P&gt;Are you guys just using mental projection now to cut down on forum traffic or what? ;-)&lt;/P&gt;&lt;P&gt;Robin Giltner&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Thu, 08 Mar 2007 11:52:36 GMT</pubDate><dc:creator>Robin J Giltner</dc:creator></item></channel></rss>