I have seen this problem posted all over, but have never ran across a
solution....
I am serializing my dataset and they look like this:
<NewDataSet>
<xs:schema id="NewDataSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true"
msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="List_101">
<xs:complexType>
<xs:attribute name="InvoiceID" type="xs:int" />
<xs:attribute name="Email" type="xs:string" />
<xs:attribute name="DomainID" type="xs:int" />
<xs:attribute name="SourceID" type="xs:int" />
<xs:attribute name="TypeEnum" type="xs:int" />
<xs:attribute name="ImportID" type="xs:int" />
<xs:attribute name="DateStamp" type="xs:dateTime" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<List_101 EmailID="InvoiceID" Em************@joe.com DomainID="2421"
SourceID="12" TypeEnum="2" ImportID="20"
DateStamp="2005-09-18T17:39:00-07:00" />
</NewDataSet>
This blows up in SQL when I call "sp_xml_preparedocument".
It has trouble converting the DateStamp (because of the format)...
If I put it in Query Analyzer and remove "-07:00" from the DateStamp it
works fine....
How do I get rid of that? I don't want to parse every file that I export,
because I'm doing a ton of them.
Is there something I can do to the DataSet??? I tried things such as:
ds.Locale = CultureInfo.InvariantCulture;
But that doesn't work, and I don't know why it would because I don't even
know what that means. I thought the "-07:00" offset might be a culture
thing....nope....
Does anyone have any ideas?