OdbcException.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // System.Data.Odbc.OdbcDataReader
  3. //
  4. // Author:
  5. // Brian Ritchie ([email protected])
  6. //
  7. // Copyright (C) Brian Ritchie, 2002
  8. //
  9. using System.Collections;
  10. using System.ComponentModel;
  11. using System.Data;
  12. using System.Data.Common;
  13. using System.Runtime.InteropServices;
  14. using System.Runtime.Serialization;
  15. namespace System.Data.Odbc
  16. {
  17. public class OdbcException : SystemException
  18. {
  19. OdbcErrorCollection col;
  20. internal OdbcException(OdbcError Error) : base (Error.Message)
  21. {
  22. col=new OdbcErrorCollection();
  23. col.Add(Error);
  24. }
  25. public int ErrorCode
  26. {
  27. get
  28. {
  29. return col[0].NativeError;
  30. }
  31. }
  32. public OdbcErrorCollection Errors
  33. {
  34. get
  35. {
  36. return col;
  37. }
  38. }
  39. public override string Source
  40. {
  41. get
  42. {
  43. return col[0].Source;
  44. }
  45. }
  46. #region Methods
  47. [MonoTODO]
  48. public override void GetObjectData (SerializationInfo si, StreamingContext context)
  49. {
  50. throw new NotImplementedException ();
  51. }
  52. #endregion // Methods
  53. }
  54. }