diff options
author | Daniel Morgan <monodanmorg@yahoo.com> | 2002-10-14 04:23:18 +0400 |
---|---|---|
committer | Daniel Morgan <monodanmorg@yahoo.com> | 2002-10-14 04:23:18 +0400 |
commit | d14239a8f373ce08620abbfe17db48a967dd9beb (patch) | |
tree | 2aa1ad029bb77a41fa0ab99c717ec700ce969178 /mcs | |
parent | 1810f3436a88ace8306ba3704dbd639613786ceb (diff) |
2002-10-13 Daniel Morgan <danmorg@sc.rr.com>
* Mono.Data.MySql/MySqlDataReader.cs: change "DataType" in
schema DataTable to be typeof(Type) instead of
typeof(string) to make it more like MS.NET
* Test/MySqlTest.cs: tweaks
svn path=/trunk/mcs/; revision=8230
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/Mono.Data.MySql/ChangeLog | 8 | ||||
-rw-r--r-- | mcs/class/Mono.Data.MySql/Mono.Data.MySql/MySqlDataReader.cs | 4 | ||||
-rw-r--r-- | mcs/class/Mono.Data.MySql/Test/MySqlTest.cs | 15 |
3 files changed, 19 insertions, 8 deletions
diff --git a/mcs/class/Mono.Data.MySql/ChangeLog b/mcs/class/Mono.Data.MySql/ChangeLog index cd465afd68f..d96b090485e 100644 --- a/mcs/class/Mono.Data.MySql/ChangeLog +++ b/mcs/class/Mono.Data.MySql/ChangeLog @@ -1,5 +1,13 @@ 2002-10-13 Daniel Morgan <danmorg@sc.rr.com> + * Mono.Data.MySql/MySqlDataReader.cs: change "DataType" in + schema DataTable to be typeof(Type) instead of + typeof(string) to make it more like MS.NET + + * Test/MySqlTest.cs: tweaks + +2002-10-13 Daniel Morgan <danmorg@sc.rr.com> + * Mono.Data.MySql/MySqlCommand.cs: * Mono.Data.MySql/MySqlConnection.cs: * Mono.Data.MySql/MySqlDataReader.cs: diff --git a/mcs/class/Mono.Data.MySql/Mono.Data.MySql/MySqlDataReader.cs b/mcs/class/Mono.Data.MySql/Mono.Data.MySql/MySqlDataReader.cs index 901efd0014f..d3309b2cc32 100644 --- a/mcs/class/Mono.Data.MySql/Mono.Data.MySql/MySqlDataReader.cs +++ b/mcs/class/Mono.Data.MySql/Mono.Data.MySql/MySqlDataReader.cs @@ -114,7 +114,7 @@ namespace Mono.Data.MySql { dataTableSchema.Columns.Add ("BaseColumnName", typeof (string)); dataTableSchema.Columns.Add ("BaseSchemaName", typeof (string)); dataTableSchema.Columns.Add ("BaseTableName", typeof (string)); - dataTableSchema.Columns.Add ("DataType", typeof(string)); + dataTableSchema.Columns.Add ("DataType", typeof(Type)); dataTableSchema.Columns.Add ("AllowDBNull", typeof (bool)); dataTableSchema.Columns.Add ("ProviderType", typeof (int)); dataTableSchema.Columns.Add ("IsAliased", typeof (bool)); @@ -164,7 +164,7 @@ namespace Mono.Data.MySql { dbType = MySqlHelper.MySqlTypeToDbType(fieldEnum); typ = MySqlHelper.DbTypeToSystemType (dbType); string st = typ.ToString();
- schemaRow["DataType"] = st;
+ schemaRow["DataType"] = typ;
schemaRow["AllowDBNull"] = false; diff --git a/mcs/class/Mono.Data.MySql/Test/MySqlTest.cs b/mcs/class/Mono.Data.MySql/Test/MySqlTest.cs index 5a418d2d4fb..d37695d379f 100644 --- a/mcs/class/Mono.Data.MySql/Test/MySqlTest.cs +++ b/mcs/class/Mono.Data.MySql/Test/MySqlTest.cs @@ -299,11 +299,14 @@ namespace Test.Mono.Data.MySql { dt.Rows.Count);
// display the schema
+ string colName;
+ string colValue;
foreach (DataRow schemaRow in dt.Rows) {
- foreach (DataColumn schemaCol in dt.Columns)
- Console.WriteLine(schemaCol.ColumnName +
- " = " +
- schemaRow[schemaCol]);
+ foreach (DataColumn schemaCol in dt.Columns) {
+ colName = schemaCol.ColumnName;
+ colValue = (schemaRow[schemaCol]).ToString();
+ Console.WriteLine(colName + " = " + colValue);
+ }
Console.WriteLine();
}
@@ -321,7 +324,7 @@ namespace Test.Mono.Data.MySql { metadataValue =
" Col " +
c + ": " +
- dr["ColumnName"];
+ dr["ColumnName"].ToString();
// column data
if(rdr.IsDBNull(c) == true)
@@ -329,7 +332,7 @@ namespace Test.Mono.Data.MySql { else
dataValue =
": " +
- rdr.GetValue(c);
+ rdr.GetValue(c).ToString();
// display column meta data and data
output = metadataValue + dataValue;
|