2002-08-18 Rodrigo Moya <rodrigo@ximian.com>
[mono.git] / mcs / class / System.Data / System.Data.OleDb / OleDbError.cs
1 //
2 // System.Data.OleDb.OleDbError
3 //
4 // Authors:
5 //   Rodrigo Moya (rodrigo@ximian.com)
6 //   Tim Coleman (tim@timcoleman.com)
7 //
8 // Copyright (C) Rodrigo Moya, 2002
9 // Copyright (C) Tim Coleman, 2002
10 //
11
12 using System.Data;
13 using System.Data.Common;
14
15 namespace System.Data.OleDb
16 {
17         public sealed class OleDbError
18         {
19                 private string errorMessage;
20                 private int nativeError;
21                 private string errorSource;
22                 private string sqlState;
23
24                 #region Constructors
25
26                 internal OleDbError (string msg, int code, string source, string sql)
27                 {
28                         errorMessage = msg;
29                         nativeError = code;
30                         errorSource = source;
31                         sqlState = sql;
32                 }
33                 
34                 #endregion // Constructors
35                 
36                 #region Properties
37
38                 public string Message {
39                         get {
40                                 return errorMessage;
41                         }
42                 }
43
44                 public int NativeError {
45                         get {
46                                 return nativeError;
47                         }
48                 }
49
50                 public string Source {
51                         get {
52                                 return errorSource;
53                         }
54                 }
55
56                 public string SqlState {
57                         get {
58                                 return sqlState;
59                         }
60                 }
61
62                 #endregion
63
64                 #region Methods
65
66                 [MonoTODO]
67                 public override string ToString ()
68                 {
69                         throw new NotImplementedException ();
70                 }
71
72                 #endregion
73         }
74 }