| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- //
- // System.Data.Odbc.OdbcDataReader
- //
- // Author:
- // Brian Ritchie ([email protected])
- //
- // Copyright (C) Brian Ritchie, 2002
- //
- using System.Collections;
- using System.ComponentModel;
- using System.Data;
- using System.Data.Common;
- using System.Runtime.InteropServices;
- using System.Runtime.Serialization;
- namespace System.Data.Odbc
- {
- public sealed class OdbcException : SystemException
- {
- OdbcErrorCollection col;
- internal OdbcException(OdbcError Error) : base (Error.Message)
- {
- col=new OdbcErrorCollection();
- col.Add(Error);
- }
- public OdbcErrorCollection Errors
- {
- get
- {
- return col;
- }
- }
- public override string Source
- {
- get
- {
- return col[0].Source;
- }
- }
- public override string Message {
- get
- {
-
- return col[0].Message;
- }
- }
-
- #region Methods
- public override void GetObjectData (SerializationInfo si, StreamingContext context)
- {
- if (si == null)
- throw new ArgumentNullException ("si");
- si.AddValue ("col", col);
- base.GetObjectData (si, context);
- }
- #endregion // Methods
- }
- }
|