[Mono-list] Various problems in ADO.NET
Alan Tam
Tam@SiuLung.com
Mon, 3 Feb 2003 15:33:45 +0800
I used this program in both csc/Windows and mcs/Linux:
using System;
using System.Data;
using ByteFX.Data.MySQLClient;
public class Test {
public static void Main() {
string connectionString = "...";
MySQLConnection myConnection = new MySQLConnection(connectionString);
myConnection.Open();
DataSet ds = new DataSet("PE");
MySQLDataAdapter adpOE = new MySQLDataAdapter();
adpOE.SelectCommand = new MySQLCommand("SELECT * FROM PE", myConnection);
adpOE.Fill(ds, "PE");
ds.WriteXmlSchema("PE.xml");
}
}
This is Linux output:
<?xml version="1.0"?>
<xs:schema targetNamespace="" xmlns:mstns="" xmlns=""
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="PE" msdata:IsDataSet="true" msdata:Locale="iv">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="PE">
<xs:complexType>
<xs:sequence>
<xs:element name="Column" type="xs:string" minOccurs="0" />
<xs:element name="Column1" type="xs:string" minOccurs="0" />
<xs:element name="Column2" type="xs:string" minOccurs="0" />
<xs:element name="Column3" type="xs:string" minOccurs="0" />
<xs:element name="Column4" type="xs:string" minOccurs="0" />
<xs:element name="Column5" type="xs:string" minOccurs="0" />
<xs:element name="Column6" type="xs:string" minOccurs="0" />
<xs:element name="Column7" type="xs:
This is Windows output:
<?xml version="1.0" standalone="yes"?>
<xs:schema id="PE" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="PE" msdata:IsDataSet="true" msdata:Locale="zh-HK">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="PE">
<xs:complexType>
<xs:sequence>
<xs:element name="PEID" type="xs:int" minOccurs="0" />
<xs:element name="EUID" type="xs:int" minOccurs="0" />
<xs:element name="Heading" type="xs:string" minOccurs="0" />
<xs:element name="DTFrom" type="xs:dateTime" minOccurs="0" />
<xs:element name="DTTo" type="xs:dateTime" minOccurs="0" />
<xs:element name="RepeatFreq" type="xs:int" minOccurs="0" />
<xs:element name="RepeatTimes" type="xs:int" minOccurs="0" />
<xs:element name="Venue" type="xs:string" minOccurs="0" />
<xs:element name="ImportType" type="xs:int" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
The Linux output contains errors on:
1. The file truncates the last <1024 byte octet.
2. The column names are all missing
3. The column types are all wrong.
May I know are they all bugs?
Regards,
Alan