Use ExecuteReader instead of ExecuteNonQuery. We need to use the CommandBehavior...
[mono.git] / mcs / class / System.Data / System.Data.Common / SchemaInfo.cs
1 //
2 // System.Data.Common.SchemaInfo.cs
3 //
4 // Author:
5 //   Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2002
8 //
9
10 using System;
11
12 namespace System.Data.Common {
13 #if NET_1_2
14 // FIXME: This needs to be cleaned up to be compatible with both versions.
15 // Unfortunately, the SchemaInfo class we made is different from the MS
16 // version which is now public.
17         public class SchemaInfo
18 #else
19         internal class SchemaInfo
20 #endif
21         {
22                 #region Fields
23
24                 string columnName;
25                 string tableName;
26                 string dataTypeName;
27                 object value;
28                 bool allowDBNull;
29                 bool isReadOnly;
30                 int ordinal;
31                 int size;
32                 byte precision;
33                 byte scale;
34                 Type fieldType;
35
36                 #endregion // Fields
37
38                 #region Constructors
39
40                 public SchemaInfo ()
41                 {
42                 }
43
44                 #endregion // Constructors
45
46                 #region Properties
47
48                 public bool AllowDBNull {
49                         get { return allowDBNull; }
50                         set { allowDBNull = value; }
51                 }
52
53                 public string ColumnName {
54                         get { return columnName; }
55                         set { columnName = value; }
56                 }
57
58                 public int ColumnOrdinal {
59                         get { return ordinal; }
60                         set { ordinal = value; }
61                 }
62
63                 public int ColumnSize {
64                         get { return size; }
65                         set { size = value; }
66                 }
67
68                 public String DataTypeName {
69                         get { return dataTypeName; }
70                         set { dataTypeName = value; }
71                 }
72
73                 public Type FieldType {
74                         get { return fieldType; }
75                         set { fieldType = value; }
76                 }
77
78                 public byte NumericPrecision {
79                         get { return precision; }
80                         set { precision = value; }
81                 }
82
83                 public byte NumericScale {
84                         get { return scale; }
85                         set { scale = value; }
86                 }
87
88                 public string TableName {
89                         get { return tableName; }
90                         set { tableName = value; }
91                 }
92
93                 public bool IsReadOnly {
94                         get { return isReadOnly; }
95                         set { isReadOnly = value; }
96                 }
97                 
98                 #endregion // Properties
99
100         }
101 }