2
0

OleDbOracleDataReader.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. //using System;
  2. //
  3. //using java.sql;
  4. //
  5. //namespace System.Data.OleDb
  6. //{
  7. // public class OleDbOracleDataReader : OleDbDataReader
  8. // {
  9. // private int _nextParameterIndex = 0;
  10. // internal OleDbOracleDataReader(OleDbCommand command)
  11. // {
  12. // _command = command;
  13. // _statement = command.getStatement();
  14. // _schemaTable = null;
  15. //
  16. // try {
  17. // _results = null;
  18. // _lastColumnAccessed = -1;
  19. // _hasRows = Read();
  20. // _rowRead = _hasRows;
  21. // }
  22. // catch (SQLException e) {
  23. // throw new Exception(e.Message, e);
  24. // }
  25. // }
  26. //
  27. // private ResultSet GetNextResultSet()
  28. // {
  29. // for (;_command.Parameters.Count > _nextParameterIndex;_nextParameterIndex++)
  30. // {
  31. // if (((OleDbParameter)_command.Parameters[_nextParameterIndex]).IsOracleRefCursor)
  32. // return (ResultSet)((CallableStatement)_statement).getObject(++_nextParameterIndex);
  33. // }
  34. //
  35. // return null;
  36. // }
  37. //
  38. // public override bool Read()
  39. // {
  40. // try {
  41. // if (_results == null) {
  42. // _results = GetNextResultSet();
  43. // _lastColumnAccessed = -1;
  44. // _rowRead = false;
  45. // _lastRowReached = false;
  46. // }
  47. //
  48. // if (_results == null) {
  49. // return false;
  50. // }
  51. //
  52. // // in the ctor we read one row so we have to check
  53. // // if a row has been read. if yes turn the flag of
  54. // // so next time we actualy read. and return the _hasRows param
  55. // // we initialize in the ctor.
  56. // if (_rowRead) {
  57. // _rowRead = false;
  58. // return _hasRows;
  59. // }
  60. // else {
  61. // if (!_lastRowReached) {
  62. // _lastRowReached = !(_results.next());
  63. // return !(_lastRowReached);
  64. // }
  65. // else {
  66. // return false;
  67. // }
  68. // }
  69. // }
  70. // catch (SQLException exp) {
  71. // throw new Exception(exp.Message, exp);
  72. // }
  73. // }
  74. //
  75. // public override bool NextResult()
  76. // {
  77. // try {
  78. // if (_results != null) {
  79. // _results.close();
  80. // }
  81. // _results = GetNextResultSet();
  82. // _lastColumnAccessed = -1;
  83. // _rowRead = false;
  84. // _lastRowReached = false;
  85. // _schemaTable = ConstructSchemaTable();
  86. //
  87. // return (_results != null);
  88. // }
  89. // catch (SQLException exp) {
  90. // throw new Exception(exp.Message, exp);
  91. // }
  92. // }
  93. // }
  94. //}