strange (DOS Error 32) DBFCDX/1006 ¿bug?

User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by ukservice »

Hello:

I use Harbour 3.1 and Windows 7 64 bits.


When I run this code, very often I got:
(DOS Error 32) DBFCDX/1006 Create error: C:\Users\John\Desktop\harbour
\DATA\CUSTOMER.cdx


Working sample at:
http://www.mediafire.com/?47nd41ki6l87jgx


Please, unzip and create a folder at your Desktop.


This is the code:

Code: Select all

#define CRLF Chr(13)+Chr(10) 


STATIC pPath 


//-------------------------------------------------------------- 
FUNCTION MAIN() 
//-------------------------------------------------------------- 


   LOCAL i := 0 


   pPath := hb_dirbase()+"DATA" 


   REQUEST DBFCDX, DBFFPT 
   RDDSETDEFAULT( "DBFCDX") 


   SET EPOCH TO 1990 
   SET CENTURY ON 
   SET DATE ITALIAN 
   SET DELETED ON 
   SetCancel( .F. ) 
   SetHandleCount( 150 ) 


   SELECT 1 
   USE (pPath+"\CUSTOMER") NEW 


   for i:= 1 to 100 
       reindex() 
   next 


   alert(str(i)+CRLF+CRLF+PPATH) 
   dbcloseall() 
   quit 


RETURN NIL 
//-------------------------------------------------------------- 


//-------------------------------------------------------------- 
FUNCTION REINDEX() 
//-------------------------------------------------------------- 


        SELECT ("CUSTOMER") 
        FERASE  (pPath+"\CUSTOMER.CDX") 
        PACK 


        INDEX ON FIELD->LAST TO (pPath+"\CUSTOMER") 
        dbCommit() 


return nil 
//-------------------------------------------------------------- 

 
What´s wrong?. Any clue?.


Thank you very much.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
codemaker
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by codemaker »

DOS ERROR 32 means, according to DOS documentation, 'network request not supported'.

But I think the problem is because the erasing and indexing happens in such a fast interval (For..Next loop) that writting to the disk in so fas iterations is the problem for the sistem. If you don't use Commit() it might not show the error because this function maybe cannot follow the iterations and while it is writting buffers on the disk, the next index command started with another commit()...


Besides, I fon't get it why this code should exist at the first place???
Maybe I am missing something but indexing the same database 100 times in a loop is not something I understand?
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by ukservice »

Hello,

Thanks for reply.

This error happens in my app from time to time. It has more dbfs and indexes, but I wrote this sample to easily reproduce the error.

In my sample, I don´t open the index file never, just use customer.dbf new.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by Antonio Linares »

John,

As Boris points, it may be a local network problem

Anyhow, it is something specifically related to Harbour, not to FWH
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by ukservice »

Antonio,

Thanks for heloping me. Yes it is not a FWH bug. I did not say that.

I am not running sample in a network. In fact, I created a second sample forcing EXCLUSIVE MODE and I still get the error.

Sample updated:
http://oron.com/8otfjgsek4zq

I think it is a serious issue and I other users could help to isolate the bug.

Thanks again,
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by Antonio Linares »

John,

You should report it in the Harbour developers list:

http://groups.google.es/group/harbour-devel
regards, saludos

Antonio Linares
www.fivetechsoft.com
hmpaquito
Posts: 1200
Joined: Thu Oct 30, 2008 2:37 pm

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by hmpaquito »

UkService,

Your code is doubly buggy:

When you opens .dbf, that open .cdx file automatic. -SET AUTOOPEN ON- is default.

Then:

1st) You must not FErase() .cdx open
2st) You must not INDEX ON .cdx open

Regards


ukservice wrote:Hello:

I use Harbour 3.1 and Windows 7 64 bits.

Code: Select all

#define CRLF Chr(13)+Chr(10) 


STATIC pPath 


//-------------------------------------------------------------- 
FUNCTION MAIN() 
//-------------------------------------------------------------- 


   LOCAL i := 0 


   pPath := hb_dirbase()+"DATA" 


   REQUEST DBFCDX, DBFFPT 
   RDDSETDEFAULT( "DBFCDX") 


   SET EPOCH TO 1990 
   SET CENTURY ON 
   SET DATE ITALIAN 
   SET DELETED ON 
   SetCancel( .F. ) 
   SetHandleCount( 150 ) 


   SELECT 1 
   USE (pPath+"\CUSTOMER") NEW 


   for i:= 1 to 100 
       reindex() 
   next 


   alert(str(i)+CRLF+CRLF+PPATH) 
   dbcloseall() 
   quit 


RETURN NIL 
//-------------------------------------------------------------- 


//-------------------------------------------------------------- 
FUNCTION REINDEX() 
//-------------------------------------------------------------- 


        SELECT ("CUSTOMER") 
        FERASE  (pPath+"\CUSTOMER.CDX") 
        PACK 


        INDEX ON FIELD->LAST TO (pPath+"\CUSTOMER") 
        dbCommit() 


return nil 
//-------------------------------------------------------------- 

 
What´s wrong?. Any clue?.


Thank you very much.
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by ukservice »

Hello,

Thanks for reply.

I did another sample, forcing exclusive and using a different name for the index and I get she same error from time to time.

I provide a new download url:
http://demo.ovh.com/es/5a0f7902749392cd ... 584111b9f/

So, that´s not the clue, sorry.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
hmpaquito
Posts: 1200
Joined: Thu Oct 30, 2008 2:37 pm

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by hmpaquito »

UkService,

I do not understand or you don´t understand :?

Code sample ok:

Code: Select all


SET AUTOPEN OFF   // Atencion / Warning / Atchung

SELECT 0
USE FileDb EXCLUSIVE
Reindex()...

 
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by Otto »

Hello UK,
you exe runs fine here.
I tested on WINDOWS Server 2008 R2.
I get the alert box saying 101 and the path.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by Otto »

Hello UK,
also of WINDOWS 7 Professional 64 bit the exe is running fine.
I will go on on a WINDOWS 8 system.
Best regards,
Otto
PS: What is you "userfriedly" name?
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by Otto »

Hello UK,
it is running fine on WINDOWS 8 but I only have 32 bit Operating System installed.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by ukservice »

Otto,

Thanks a lot. Did you run it several times (8-10)?.

What Harbour and Linker do you use?,

Thanks.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by Otto »

Uk,
I made now 25 tests (windows 7 prof 64 bit). All is working well.
I use your exe file.
What is your"userfriedly" name?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?

Post by ukservice »

Otto,

My name is John.

Thanks for helping me.

Last question please, what Harbour and linker do you use?.

Regards,

John
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Post Reply