* OdbcParameterTest.cs: Fixed compilation on 1.0 profile.
[mono.git] / mcs / class / System.Data / System.Data.SqlTypes / SqlString.cs
index 592d76f179d95e2acd73b94a133ea899bfff5252..02d903a48df2c6529155036b31f3080e1d5ce1ad 100644 (file)
@@ -289,8 +289,8 @@ namespace System.Data.SqlTypes
                {
                        if (!(value is SqlString))
                                return false;
-                       if (this.IsNull && ((SqlString)value).IsNull)
-                               return true;
+                       if (this.IsNull)
+                               return ((SqlString)value).IsNull;
                        else if (((SqlString)value).IsNull)
                                return false;
                        else
@@ -602,14 +602,19 @@ namespace System.Data.SqlTypes
 #if NET_2_0
                public static XmlQualifiedName GetXsdType (XmlSchemaSet schemaSet)
                {
-                       XmlQualifiedName qualifiedName = new XmlQualifiedName ("string", "http://www.w3.org/2001/XMLSchema");
-                       return qualifiedName;
+                       if (schemaSet != null && schemaSet.Count == 0) {
+                               XmlSchema xs = new XmlSchema ();
+                               XmlSchemaComplexType ct = new XmlSchemaComplexType ();
+                               ct.Name = "string";
+                               xs.Items.Add (ct);
+                               schemaSet.Add (xs);
+                       }
+                       return new XmlQualifiedName ("string", "http://www.w3.org/2001/XMLSchema");
                }
 
-               [MonoTODO]
                XmlSchema IXmlSerializable.GetSchema ()
                {
-                       throw new NotImplementedException ();
+                       return null;
                }
                
                void IXmlSerializable.ReadXml (XmlReader reader)