: __pDataRow(null)
, __pColumnTypeList(null)
, __columnCount(0)
+ , __dataSetDeleted(false)
{
}
_DataRowImpl::~_DataRowImpl(void)
{
+ if (!__dataSetDeleted)
+ {
+ __pRowImplList->Remove(*this);
+ }
}
result
"Wrong column index.");
SysTryReturnResult(NID_IO, pValue != null, E_INVALID_ARG, "pValue is null");
+ //return E_SUCCESS without doing anything if the parent dataset class is destroyed.
+ if (__dataSetDeleted)
+ return r;
+
pColumnType = static_cast<Integer*>(__pColumnTypeList->GetAt(columnIndex));
nColumnType = pColumnType->ToInt();
SysTryReturnResult(NID_IO, nColumnType == DB_COLUMNTYPE_BLOB || nColumnType == DB_COLUMNTYPE_NULL,
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Wrong column index.");
+ //return E_SUCCESS without doing anything if the parent dataset class is destroyed.
+ if (__dataSetDeleted)
+ return r;
+
pColumnType = static_cast<Integer*>(__pColumnTypeList->GetAt(columnIndex));
nColumnType = pColumnType->ToInt();
SysTryReturnResult(NID_IO, nColumnType == DB_COLUMNTYPE_TEXT || nColumnType == DB_COLUMNTYPE_NULL,
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Wrong column index.");
+ //return E_SUCCESS without doing anything if the parent dataset class is destroyed.
+ if (__dataSetDeleted)
+ return r;
+
pColumnType = static_cast<Integer*>(__pColumnTypeList->GetAt(columnIndex));
nColumnType = pColumnType->ToInt();
SysTryReturnResult(NID_IO, nColumnType == DB_COLUMNTYPE_DOUBLE || nColumnType == DB_COLUMNTYPE_NULL,
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Wrong column index.");
+ //return E_SUCCESS without doing anything if the parent dataset class is destroyed.
+ if (__dataSetDeleted)
+ return r;
+
pColumnType = static_cast<Integer*>(__pColumnTypeList->GetAt(columnIndex));
nColumnType = pColumnType->ToInt();
SysTryReturnResult(NID_IO, nColumnType == DB_COLUMNTYPE_INT || nColumnType == DB_COLUMNTYPE_NULL,
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Wrong column index.");
+ //return E_SUCCESS without doing anything if the parent dataset class is destroyed.
+ if (__dataSetDeleted)
+ return r;
+
pColumnType = static_cast<Integer*>(__pColumnTypeList->GetAt(columnIndex));
nColumnType = pColumnType->ToInt();
SysTryReturnResult(NID_IO, nColumnType == DB_COLUMNTYPE_INT64 || nColumnType == DB_COLUMNTYPE_NULL,
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Wrong column index.");
+ //return E_SUCCESS without doing anything if the parent dataset class is destroyed.
+ if (__dataSetDeleted)
+ return r;
+
pColumnType = static_cast<Integer*>(__pColumnTypeList->GetAt(columnIndex));
nColumnType = pColumnType->ToInt();
SysTryReturnResult(NID_IO, nColumnType == DB_COLUMNTYPE_TEXT || nColumnType == DB_COLUMNTYPE_NULL,
{
_DataSetEnumeratorImpl::_DataSetEnumeratorImpl(void)
- : __pDataSet(null),
- __pColumnList(null),
- __pCurrentRow(null),
- __columnCount(0),
- __rowCount(0),
- __currentRowIndex(-1),
- __dataSetDeleted(0)
+ : __pDataSet(null)
+ , __pColumnList(null)
+ , __pCurrentRow(null)
+ , __columnCount(0)
+ , __rowCount(0)
+ , __currentRowIndex(-1)
+ , __dataSetDeleted(false)
{
}
_DataSetEnumeratorImpl::~_DataSetEnumeratorImpl(void)
{
- if (__dataSetDeleted == 0)
+ if (!__dataSetDeleted)
{
__pEnumImplList->Remove(*this);
}
{
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
if (__currentRowIndex +1 == __rowCount)
{
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
if (__currentRowIndex == 0)
{
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
__currentRowIndex = 0;
{
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
__currentRowIndex = __rowCount -1;
{
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
__currentRowIndex = -1;
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Given column index is out of range.");
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Given column index is out of range.");
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Given column index is out of range.");
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Given column index is out of range.");
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Given column index is out of range.");
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Given column index is out of range.");
SysTryReturnResult(NID_IO, __pDataSet != null, E_INVALID_STATE,
"The Object is not constructed.");
- SysTryReturnResult(NID_IO, __dataSetDeleted != 1, E_INVALID_STATE,
+ SysTryReturnResult(NID_IO, __dataSetDeleted != true, E_INVALID_STATE,
"The dataset is already been deleted.");
SysTryReturnResult(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, E_INVALID_ARG,
"Given column index is out of range.");
{
SysTryReturn(NID_IO, __pDataSet != null, -1, E_INVALID_STATE,
"[E_INVALID_STATE] The Object is not constructed.");
- SysTryReturn(NID_IO, __dataSetDeleted != 1, -1, E_INVALID_STATE,
+ SysTryReturn(NID_IO, __dataSetDeleted != true, -1, E_INVALID_STATE,
"[E_INVALID_STATE] The dataset is already been deleted.");
return __columnCount;
SysTryReturn(NID_IO, __pDataSet != null, DB_COLUMNTYPE_UNDEFINED, E_INVALID_STATE,
"[E_INVALID_STATE] The instance is not constructed.");
- SysTryReturn(NID_IO, __dataSetDeleted != 1, DB_COLUMNTYPE_UNDEFINED, E_INVALID_STATE,
+ SysTryReturn(NID_IO, __dataSetDeleted != true, DB_COLUMNTYPE_UNDEFINED, E_INVALID_STATE,
"[E_INVALID_STATE] The dataset is already been deleted.");
SysTryReturn(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, DB_COLUMNTYPE_UNDEFINED, E_INVALID_ARG,
"[E_INVALID_ARG] Given column index is out of range.");
{
SysTryReturn(NID_IO, __pDataSet != null, null, E_INVALID_STATE,
"[E_INVALID_STATE] The instance is not constructed.");
- SysTryReturn(NID_IO, __dataSetDeleted != 1, null, E_INVALID_STATE,
+ SysTryReturn(NID_IO, __dataSetDeleted != true, null, E_INVALID_STATE,
"[E_INVALID_STATE] The dataset is already been deleted.");
SysTryReturn(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, null, E_INVALID_ARG,
"[E_INVALID_ARG] Given column index is out of range.");
SysTryReturn(NID_IO, __pDataSet != null, -1, E_INVALID_STATE,
"[E_INVALID_STATE] The instance is not constructed.");
- SysTryReturn(NID_IO, __dataSetDeleted != 1, -1, E_INVALID_STATE,
+ SysTryReturn(NID_IO, __dataSetDeleted != true, -1, E_INVALID_STATE,
"[E_INVALID_STATE] The dataset is already been deleted.");
SysTryReturn(NID_IO, columnIndex >= 0 && columnIndex < __columnCount, -1, E_INVALID_ARG,
"[E_INVALID_ARG] Given column index is out of range.");