DataColumn 与Xml data type转换。
2008-01-16 23:22
363 查看
下面代码通过反射System.Data程序集得到
string XmlDataTypeName(Type type) { (type == (char)) { ; } ((type == (byte[])) || (type == (SqlBytes))) { ; } ((type == (DateTime)) || (type == (SqlDateTime))) { ; } (type == (TimeSpan)) { ; } (((type == (decimal)) || (type == (SqlDecimal))) || (type == (SqlMoney))) { ; } (type == (int)) { ; } ((type == (bool)) || (type == (SqlBoolean))) { ; } ((type == (float)) || (type == (SqlSingle))) { ; } ((type == (double)) || (type == (SqlDouble))) { ; } ((type == (sbyte)) || (type == (SqlByte))) { ; } (type == (byte)) { ; } ((type == (short)) || (type == (SqlInt16))) { ; } ((type == (int)) || (type == (SqlInt32))) { ; } ((type == (long)) || (type == (SqlInt64))) { ; } (type == (ushort)) { ; } (type == (uint)) { ; } (type == (ulong)) { ; } (type == (Uri)) { ; } (type == (SqlBinary)) { ; } (((type == (string)) || (type == (SqlGuid))) || ((type == (SqlString)) || (type == (SqlChars)))) { ; } ((type != (object)) && (type != (SqlXml))) { string.Empty; } ; } |
相关文章推荐
- XML Datatype
- Xml data type is not supported in distributed queries.
- Overview of solrconfig.xml 之 Common XML data-structure and type elements
- Work with XML Data Type in SQL Server 2005 from ADO.NET 2.0
- jQuery.ajax() datatype:“json" 转换失败
- 错误修复:java.lang.NoClassDefFoundError: org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl$Parser
- java.lang.NoClassDefFoundError: org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl$DaysInMonth
- python dataframe astype 字段类型转换
- javax.xml.bind.DatatypeConverter
- 利用 javax.xml.datatype.Duration 解析 activiti:dueDate="P1DT3H" 这种时间格式
- schema.xml文件里datatype的定义格式
- Output an XML type attribute using DataContract
- The Fundamentals of the SQL Server 2005 XML Datatype
- .net中xsl转换方式 XPathDocument > XmlDocument > XmlDataDocument
- Java基本类型转换(Primitive Data Type Casting) int/byte & char
- Jackson怎样转换这样的字符串? String jsonStr = "{dataType:'Custom',regexp:'t\\d+',msg:'输入不正确'}";
- XML Data Type Methods(一)
- javax.xml.datatype.XMLGregorianCalendar
- TypeError: Error #1034: 强制转换类型失败:无法将 flash.display::BitmapData@79aea11 转换为 flash.display.Bitmap
- A simple of Using XML Data Source type and Querying a Web Service with Reporting Services 2008