FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sat Feb 11, 2012 08:55 PM
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 (fw): Select all Collapse
#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
Posts: 208
Joined: Wed Dec 03, 2008 04:48 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sat Feb 11, 2012 11:54 PM

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?

Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 09:34 AM

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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 10:31 AM

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
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 12:40 PM

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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 01:11 PM
John,

You should report it in the Harbour developers list:

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

Antonio Linares
www.fivetechsoft.com
Posts: 1515
Joined: Thu Oct 30, 2008 02:37 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 03:18 PM
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 (fw): Select all Collapse
#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.
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 04:18 PM

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
Posts: 1515
Joined: Thu Oct 30, 2008 02:37 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 04:32 PM
UkService,

I do not understand or you don´t understand :-)

Code sample ok:
Code (fw): Select all Collapse
SET AUTOPEN OFF   // Atencion / Warning / Atchung

SELECT 0
USE FileDb EXCLUSIVE
Reindex()...
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 04:42 PM

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

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 04:46 PM

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?

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 04:51 PM

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

Best regards,
Otto

Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 06:03 PM

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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 07:31 PM

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

Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: strange (DOS Error 32) DBFCDX/1006 ¿bug?
Posted: Sun Feb 12, 2012 09:06 PM

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