SqlErrorCollection.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * @(#)SqlErrorCollection.java 1.0 01/01/03
  3. *
  4. * Copyright 2002 Mainsoft Corporation. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Mainsoft Corporation.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. namespace System.Data.SqlClient
  11. {
  12. /**
  13. * Collects all errors generated by the SQL .NET Data Provider.
  14. *
  15. * @author Pavel Sandler
  16. * @version 1.0, 01/01/03
  17. */
  18. using System.Collections;
  19. using System.Data.Common;
  20. using System.Data.ProviderBase;
  21. using java.sql;
  22. [Serializable]
  23. public class SqlErrorCollection : AbstractDbErrorCollection
  24. {
  25. internal SqlErrorCollection(SQLException e, AbstractDBConnection connection) : base(e, connection) {}
  26. /**
  27. * Gets the error at the specified index.
  28. *
  29. * @param index of the error
  30. * @return Error on specified index
  31. */
  32. public SqlError this[int index]
  33. {
  34. get
  35. {
  36. return (SqlError)GetDbItem(index);
  37. }
  38. }
  39. protected override AbstractDbError CreateDbError(java.sql.SQLException e, System.Data.Common.AbstractDBConnection connection) {
  40. return new SqlError(e, connection);
  41. }
  42. }
  43. }