Page 1 of 2

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

Posted: Sat Feb 11, 2012 8:55 pm
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.

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

Posted: Sat Feb 11, 2012 11:54 pm
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?

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

Posted: Sun Feb 12, 2012 9:34 am
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.

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

Posted: Sun Feb 12, 2012 10:31 am
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

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

Posted: Sun Feb 12, 2012 12:40 pm
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,

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

Posted: Sun Feb 12, 2012 1:11 pm
by Antonio Linares
John,

You should report it in the Harbour developers list:

http://groups.google.es/group/harbour-devel

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

Posted: Sun Feb 12, 2012 3:18 pm
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.

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

Posted: Sun Feb 12, 2012 4:18 pm
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.

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

Posted: Sun Feb 12, 2012 4:32 pm
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()...

 

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

Posted: Sun Feb 12, 2012 4:42 pm
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

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

Posted: Sun Feb 12, 2012 4:46 pm
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?

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

Posted: Sun Feb 12, 2012 4:51 pm
by Otto
Hello UK,
it is running fine on WINDOWS 8 but I only have 32 bit Operating System installed.

Best regards,
Otto

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

Posted: Sun Feb 12, 2012 6:03 pm
by ukservice
Otto,

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

What Harbour and Linker do you use?,

Thanks.

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

Posted: Sun Feb 12, 2012 7:31 pm
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

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

Posted: Sun Feb 12, 2012 9:06 pm
by ukservice
Otto,

My name is John.

Thanks for helping me.

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

Regards,

John