Using 2.0.07.0308 of the support libraries, 2.0.07.0129 of the driver.
I have an XML column on my table, and LLBLGen generates a string field on my Self-Servicing Business Entity. I assign the XML to the string, and Save and get an exception. It seems from the SQL generated that LLBLGen may not be casting the string to an XML type before doing the insert.
Any help?
The exception message is:
An exception was caught during the execution of an action query: XML parsing: line 1, character 38, unable to switch the encoding. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception."
The SQL generated is as follows:
Query: INSERT INTO [ReportManager].[dbo].[Report] ([CommID], [PeriodFrom], [PeriodTo], [StatusName], [Filename], [FormType], [AmendmentNum], [GeneratorSettings]) VALUES (@CommId, @PeriodFrom, @PeriodTo, @StatusName, @Filename, @FormType, @AmendmentNum, @GeneratorSettings);SELECT @Id=SCOPE_IDENTITY()
Parameter: @Id : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Output. Value: <undefined value>.
Parameter: @CommId : AnsiString. Length: 20. Precision: 0. Scale: 0. Direction: Input. Value: "1292765".
Parameter: @PeriodFrom : DateTime. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: 1/1/2007 12:00:00 AM.
Parameter: @PeriodTo : DateTime. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: 4/14/2007 12:00:00 AM.
Parameter: @StatusName : AnsiString. Length: 50. Precision: 0. Scale: 0. Direction: Input. Value: "New".
Parameter: @Filename : AnsiString. Length: 250. Precision: 0. Scale: 0. Direction: Input. Value: "C:\AIMCAM\1292765_4-14-2007_Original.CAL".
Parameter: @FormType : AnsiString. Length: 10. Precision: 0. Scale: 0. Direction: Input. Value: "460".
Parameter: @AmendmentNum : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 0.
Parameter: @GeneratorSettings : Xml. Length: 2147483647. Precision: 0. Scale: 0. Direction: Input. Value: <?xml version="1.0" encoding="utf-8"?>
<FilingGeneratorSpec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Info>
<ReportRange>
<From>2007-01-01T00:00:00</From>
<To>2007-04-14T00:00:00</To>
</ReportRange>
<AggregateRange>
<From>2007-01-01T00:00:00</From>
<To>2007-04-14T00:00:00</To>
</AggregateRange>
<CommitteeID>1299999</CommitteeID>
<CommitteeName>Test Comm</CommitteeName>
<Government>State</Government>
<Form>956/Form>
<FilingData>
<item>
<key>
<string>CashOnHand</string>
</key>
<value>
<string>16369.82</string>
</value>
</item>
<item>
<key>
<string>Report Period</string>
</key>
<value>
<string>Pre-Election</string>
</value>
</item>
<item>
<key>
<string>DateSigned</string>
</key>
<value>
<string>4/23/2007</string>
</value>
</item>
<item>
<key>
<string>FormType</string>
</key>
<value>
<string>956</string>
</value>
</item>
<item>
<key>
<string>AmendNum</string>
</key>
<value>
<string>000</string>
</value>
</item>
<item>
<key>
<string>CommID</string>
</key>
<value>
<string>7403</string>
</value>
</item>
<item>
<key>
<string>ElectionDate</string>
</key>
<value>
<string>3/6/2007</string>
</value>
</item>
</FilingData>
<UserData />
</Info>
<TemplatePath>\\server3\Filing.Specs</TemplatePath>
</FilingGeneratorSpec>.