summaryrefslogtreecommitdiff
path: root/src/core/xbixbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/xbixbase.cpp')
-rwxr-xr-xsrc/core/xbixbase.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/core/xbixbase.cpp b/src/core/xbixbase.cpp
index 40c1563..8b64fd6 100755
--- a/src/core/xbixbase.cpp
+++ b/src/core/xbixbase.cpp
@@ -52,7 +52,6 @@ xbInt16 xbIx::AddKeys( xbUInt32 ulRecNo ){
xbInt16 iErrorStop = 0;
xbInt16 i = 0;
xbInt16 iKeySts;
-// std::cout << "xbIx::AddKeys\n";
try{
void * vpTag;
@@ -60,9 +59,7 @@ xbInt16 xbIx::AddKeys( xbUInt32 ulRecNo ){
for( i = 0; i < iTagCount; i++ ){
vpTag = GetTag( i );
-
iKeySts = GetKeySts( vpTag );
-// std::cout << "AddKeys() KeySts = " << iKeySts << "\n";
if( iKeySts == 1 || iKeySts == 2 ){
if(( iRc = UpdateTagKey( 'A', vpTag, ulRecNo )) != XB_NO_ERROR ){
@@ -241,7 +238,7 @@ xbInt16 xbIx::CheckForDupKeys(){
for( i = 0; i < iTagCount; i++ ){
vpTag = GetTag( i );
if(( iRc = CheckForDupKey( vpTag )) < XB_NO_ERROR ){
- iErrorStop = 10;
+ iErrorStop = 100;
throw iRc;
}
}
@@ -269,7 +266,7 @@ xbInt16 xbIx::Close(){
try{
if(( iRc = xbFclose()) != XB_NO_ERROR ){
- iErrorStop = 20;
+ iErrorStop = 100;
throw iRc;
}
}
@@ -335,7 +332,7 @@ xbInt16 xbIx::CreateKeys( xbInt16 iOpt ) {
for( i = 0; i < iTagCount; i++ ){
vpTag = GetTag( i );
if(( iRc = CreateKey( vpTag, iOpt )) < XB_NO_ERROR ){
- iErrorStop = 10;
+ iErrorStop = 100;
throw iRc;
}
}
@@ -372,7 +369,7 @@ xbInt16 xbIx::DeleteKeys(){
vpTag = GetTag( i );
if( GetKeySts( vpTag ) > 1 ){ // 0 = no update 1 = add 2 = update, 3 = delete
if(( iRc = UpdateTagKey( 'D', vpTag )) != XB_NO_ERROR ){
- iErrorStop = 10;
+ iErrorStop = 100;
throw iRc;
}
}
@@ -736,17 +733,17 @@ xbInt16 xbIx::Open( const xbString & sFileName ){
this->SetFileName( sFileName );
if( !FileExists()){
- iErrorStop = 10;
+ iErrorStop = 100;
iRc = XB_FILE_NOT_FOUND;
throw iRc;
}
/* open the file */
if(( iRc = xbFopen( dbf->GetOpenMode(), dbf->GetShareMode())) != XB_NO_ERROR ){
- iErrorStop = 20;
+ iErrorStop = 110;
throw iRc;
}
if(( iRc = ReadHeadBlock()) != XB_NO_ERROR ){
- iErrorStop = 40;
+ iErrorStop = 120;
throw iRc;
}
SetCurTag( (xbInt16) 0 ); // default the first tag as the current tag