I read in a earlier post that I can get the column of a grid to sort by datetime if the column type was set as Date
I deserialize my XML and one attribute of the XSD has type as dateTime but upon inspection and behavior in the gri
the data type is string. If I preview the dataset with the GUI in VISSTUDIO it shows my datatype to be dateTime ..
If I try to rest the datatype I get this erro
Additional information: Cannot change DataType of a column once it has data
This adds 2 new tables ..
FileStream finschema= new FileStream(schemaPath,FileMode.Open,FileAccess.Rea d,FileShare.Read)
ds.ReadXmlSchema(finschema);
finschema.Close()
Table
System.Strin
System.Strin
System.Strin
System.String // should have been dateTime !!
System.Strin
System.Strin
System.Int3
Table
System.Strin
System.Int3
Finally if If I try to rest the datatype I get this erro
Additional information: Cannot change DataType of a column once it has data
What's wrong ??? Thanks Andre
?xml version="1.0" encoding="UTF-8" ?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"><xs:element name="transactionrecord"><xs:complexType><xs:seque nce><xs:element ref="message" /></xs:sequence><xs:attribute name="customercode" type="xs:string" use="optional" /><xs:attribute name="model" type="xs:string" use="optional" /><xs:attribute name="documentid" type="xs:string" use="optional" /><xs:attribute name="transactiondate" type="xs:dateTime" use="optional" /><xs:attribute name="transactiontype" type="xs:string" use="optional" /></xs:complexType></xs:element><xs:element name="transactions"><xs:complexType><xs:sequence>< xs:element ref="transactionrecord" maxOccurs="unbounded" /></xs:sequence><xs:attribute name="application" type="xs:string" use="optional" /></xs:complexType></xs:element><xs:element name="message"></xs:element></xs:schema>