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

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

Postby ukservice » Sat Feb 11, 2012 8: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: Select all  Expand view  RUN

#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
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

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

Postby codemaker » 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?
User avatar
codemaker
 
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

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

Postby ukservice » Sun Feb 12, 2012 9: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
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

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

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby ukservice » 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
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

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

Postby Antonio Linares » Sun Feb 12, 2012 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby hmpaquito » Sun Feb 12, 2012 3: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: Select all  Expand view  RUN

#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.
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

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

Postby ukservice » Sun Feb 12, 2012 4: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
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

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

Postby hmpaquito » Sun Feb 12, 2012 4:32 pm

UkService,

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

Code sample ok:
Code: Select all  Expand view  RUN


SET AUTOPEN OFF   // Atencion / Warning / Atchung

SELECT 0
USE FileDb EXCLUSIVE
Reindex()...

 
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

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

Postby Otto » Sun Feb 12, 2012 4: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6346
Joined: Fri Oct 07, 2005 7:07 pm

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

Postby Otto » Sun Feb 12, 2012 4: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?
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6346
Joined: Fri Oct 07, 2005 7:07 pm

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

Postby Otto » Sun Feb 12, 2012 4:51 pm

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
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6346
Joined: Fri Oct 07, 2005 7:07 pm

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

Postby ukservice » Sun Feb 12, 2012 6: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
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

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

Postby Otto » Sun Feb 12, 2012 7: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6346
Joined: Fri Oct 07, 2005 7:07 pm

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

Postby ukservice » Sun Feb 12, 2012 9: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
User avatar
ukservice
 
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests