Author: suresh
Date: 2005-04-04 04:27:22 -0400 (Mon, 04 Apr 2005)
New Revision: 42505

Modified:
   trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog
   trunk/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs
Log:
2005-04-04  Sureshkumar T  <[EMAIL PROTECTED]>

        * OdbcDataReader.cs: Ignore BaseTableName & BaseColumnName
        properties while building Schema information as most drivers
        ignores these properties. e.g. PostgreSQL.



Modified: trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog      2005-04-04 
08:20:37 UTC (rev 42504)
+++ trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog      2005-04-04 
08:27:22 UTC (rev 42505)
@@ -1,3 +1,9 @@
+2005-04-04  Sureshkumar T  <[EMAIL PROTECTED]>
+
+       * OdbcDataReader.cs: Ignore BaseTableName & BaseColumnName
+       properties while building Schema information as most drivers
+       ignores these properties. e.g. PostgreSQL.
+
 2005-03-24  Sureshkumar T  <[EMAIL PROTECTED]>
            Appasamy <[EMAIL PROTECTED]>
 

Modified: trunk/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs      
2005-04-04 08:20:37 UTC (rev 42504)
+++ trunk/mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs      
2005-04-04 08:27:22 UTC (rev 42505)
@@ -567,10 +567,20 @@
                                                 }
                                         }
 
-                                       schemaRow["BaseCatalogName"] = "";      
                        
-                                       schemaRow["BaseColumnName"] = 
GetColumnAttributeStr (i+1, FieldIdentifier.BaseColumnName);
-                                       schemaRow["BaseSchemaName"] = "";
-                                       schemaRow["BaseTableName"] = 
GetColumnAttributeStr (i+1, FieldIdentifier.BaseTableName);
+                                        schemaRow["BaseCatalogName"] = "";
+                                        schemaRow["BaseColumnName"] = "";
+                                        schemaRow["BaseSchemaName"] = "";
+                                        schemaRow["BaseTableName"] = "";
+
+                                        try {
+                                                schemaRow["BaseColumnName"] = 
GetColumnAttributeStr (i+1, FieldIdentifier.BaseColumnName);
+                                                schemaRow["BaseTableName"] = 
GetColumnAttributeStr (i+1, FieldIdentifier.BaseTableName);
+                                        } catch (Exception e) {
+                                                // ignore these properties as 
they are optional.
+                                        }
+                                        
+
+
                                        schemaRow["DataType"] = col.DataType;
 
                                        schemaRow["AllowDBNull"] = 
col.AllowDBNull;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to