[Mono-bugs] [Bug 332875] Exception with ReadXmlSchema

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jun 26 23:47:45 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=332875

User ben at trustorm.com.au added comment
https://bugzilla.novell.com/show_bug.cgi?id=332875#c4


Ben Martin <ben at trustorm.com.au> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |ben at trustorm.com.au
           Severity|Minor                                           |Major
         OS/Version|Other                                           |All
           Priority|P5 - None                                       |P2 - High
            Version|1.2                                             |unspecified




--- Comment #4 from Ben Martin <ben at trustorm.com.au>  2008-06-26 21:47:44 MDT ---
I am having the same problem.

The problem is in the XmlSchemaDataImporter.cs method AddParentKeyColumn
line 833.

It exits the method when the currentTable.PrimaryKey != null.  This leaves the
pass variable DataColumn col not set to the correct column name.

I suggest that the code be changed to:

if (currentTable.PrimaryKey != null)
{
   return;
}
else
{
   col.ColumnName = currentTable.PrimaryKey.ColumnName;
   col.ColumnMapping = currentTable.PrimaryKey.ColumnMapping;
   col.Namespace = currentTable.PrimaryKey.Namespace;
   col.DataType = currentTable.PrimaryKey.DataType;
   col.AutoIncrement = currentTable.PrimaryKey.AutoIncrement;
   col.AllowDBNull = currentTable.PrimaryKey.AllowDBNull;

   return;
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list