dos error 64

772 views
Skip to first unread message

José Quintas

unread,
Jul 6, 2014, 8:16:20 PM7/6/14
to harbou...@googlegroups.com
Windows Server network.
Some terminals stays in "wait state".
Application is loaded.
When reuse get this error.

Seems that terminal need a time to reconnect but Harbour don't wait this
time.

Log error is saved in same mapped server folder (same as DBFs).

What I can do to reduce this error?

José M. C. Quintas

Ganesh Makwana

unread,
Jul 7, 2014, 12:09:59 AM7/7/14
to Ganesh Makwana
Specially DOS Error 64 means Network name deleted

Please refer below link for detail list of DOS errors:

http://cch4clipper.blogspot.in/2009/01/common-dis-errors.html

I hope this helps.

Regards


Ganesh Makwana

> Date: Sun, 6 Jul 2014 21:16:23 -0300
> From: josed...@mandic.com.br
> To: harbou...@googlegroups.com
> Subject: [harbour-users] dos error 64
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Harbour Users" group.
> Unsubscribe: harbour-user...@googlegroups.com
> Web: http://groups.google.com/group/harbour-users
>
> ---
> You received this message because you are subscribed to the Google Groups "Harbour Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

José Quintas

unread,
Jul 7, 2014, 3:19:45 PM7/7/14
to harbou...@googlegroups.com
Perhaps anything like this:

IF e:GenCode == EG_OPEN .AND. e:OsCode == 64 .AND. e:CanDefault
Inkey(1)
NetErr( .T. )
RETURN .F.
ENDIF

José M. C. Quintas

José Quintas

unread,
Jul 7, 2014, 3:35:26 PM7/7/14
to harbou...@googlegroups.com
Or this:

IF e:OsCode == 64
wOpen( 10, 10, 20, 80, "Atention" )
@ 15, 15 SAY "Server not found. Try again in 2 seconds"
Inkey(2)
wClose()
RETURN .T.
ENDIF

José M. C. Quintas


Klas Engwall

unread,
Jul 7, 2014, 5:30:56 PM7/7/14
to harbou...@googlegroups.com
Hi José,
Any relation to this registry setting?

http://technet.microsoft.com/en-us/library/cc960235.aspx

I remember that Autodisconnect used to be a problem with NT4 if not set
to FFFFFFFF, but haven't seen it in recent year.

Regards,
Klas

José Quintas

unread,
Jul 7, 2014, 6:08:04 PM7/7/14
to harbou...@googlegroups.com
Same as this:
http://support.microsoft.com/kb/297684/en-us

For Microsoft......
'Some earlier programs may not save files or access data when the drive is disconnected. However, these programs function normally before the drive is disconnected. "

My change in errorsys.prg is to try make harbour wait reconnect time.

My current problem is in a network where users left application loaded, but without use.
No access to server and old source code - need time to change all to exit when not in use.

José M. C. Quintas

Klas Engwall

unread,
Jul 7, 2014, 8:25:56 PM7/7/14
to harbou...@googlegroups.com
Hi José,
Yes, different document, same topic ...

> For Microsoft......
> 'Some earlier programs may not save files or access data when the drive
> is disconnected. However, these programs function normally before the
> drive is disconnected."
>
> My change in errorsys.prg is to try make harbour wait reconnect time.
>
> My current problem is in a network where users left application loaded,
> but without use.

Yes, your problem sounds very much like the autodisconnect "feature"
which was introduced to ease the burden on the server when applications
on the workstations are idle. The FFFFFFFF setting will keep the
connection open forever, or until the computer is thrown in the
dumpster, whichever comes first :-)

> No access to server

Ah...

Another thing worth checking is if the network cards in the workstations
are configured to turn themselves off when idle.

> and old source code - need time to change all to
> exit when not in use.

But killing the application can actually be fixed quite easily without
rewriting the entire application, using FT_OnTick() and a flag that
keeps the time of the last keypress (updated in a custom getsys and a
couple of other places). You can set the application to self destruct at
a time you have selected (say, 10 PM) if it has been idle for, say, a
full hour, or otherwise when the full hour has expired after the time of
night you have selected. I use it to close the dbf files for backup.

Regards,
Klas

José Quintas

unread,
Jul 8, 2014, 7:58:02 AM7/8/14
to harbou...@googlegroups.com

Em 07/07/2014 21:25, Klas Engwall escreveu:
>
> But killing the application can actually be fixed quite easily without
> rewriting the entire application, using FT_OnTick() and a flag that
> keeps the time of the last keypress (updated in a custom getsys and a
> couple of other places). You can set the application to self destruct
> at a time you have selected (say, 10 PM) if it has been idle for, say,
> a full hour, or otherwise when the full hour has expired after the
> time of night you have selected. I use it to close the dbf files for
> backup.
>
> Regards,
> Klas
>

As example, I change getsys to this:

WHILE ( oGet:EXITState == GE_NOEXIT )
nKey := Inkey( 600 )
nKey := iif( nKey == 0, K_ESC, nKey )
//nKey := WaitKey()
GetApplyKey( oGet, nKey, lIsMouse)
ENDDO

But need change another wait states too.
In this way, I know when I can exit application.

Another way (until a final solution):
using multithread, a thread to access disk every 5 minutes.

Note:
For backup, the best is application not in use, ok.
But Harbour+ZIP works using shared DBFs.

José M. C. Quintas

Klas Engwall

unread,
Jul 8, 2014, 12:26:59 PM7/8/14
to harbou...@googlegroups.com
Hi José,

> As example, I change getsys to this:
>
> WHILE ( oGet:EXITState == GE_NOEXIT )
> nKey := Inkey( 600 )
> nKey := iif( nKey == 0, K_ESC, nKey )
> //nKey := WaitKey()
> GetApplyKey( oGet, nKey, lIsMouse)
> ENDDO

I am sure this can be done in several different ways. Your way will exit
the get after 600 seconds no matter if it is night or day. That may not
be appreciated by someone who comes back after sitting for an hour in a
meeting. The solution I use can be found below. It is the same I used in
Clipper (with NanFor) for many years.

> But need change another wait states too.
> In this way, I know when I can exit application.

That is what I meant with "a couple of other places" :-)

> Another way (until a final solution):
> using multithread, a thread to access disk every 5 minutes.

Or use the second thread to access the flag I mentioned ... but of
course, if the network drive is disconnected after only 5 minutes, it
might be a good workaround to access it from a second thread like that.
But it would probably be better to talk to the network admin.
Disconnecting drives that quickly is nuts and counterproductive, IMHO.

> Note:
> For backup, the best is application not in use, ok.
> But Harbour+ZIP works using shared DBFs.

Well, I prefer running a backup of the entire server on tape in the wee
hours. And some people use backup servers in a similar way. Just
different preferences :-)

Anyway, here is what I do. I have a function called LastKeySec()

//===========================================================

function LastKeySec( lSet )

// Save the seconds() value of the last keypress so TimeOutQuit() can
// determine if the applications is idle and can be terminated

static nLastKeySec := 0

if valtype( lSet ) != 'L'
lSet := .F.
endif

if lSet .or. nLastKeySec == 0
nLastKeySec := seconds() // Set the flag to "now"
endif

return nLastKeySec

//===========================================================

I simply call it with LastKeySec(.T.) from the getreader, from achoice()
user functions etc. It it easy to sprinkle a few of those function calls
where you need them. At the top of the application I call FT_OnTick()
like this:

FT_OnTick( { || TimeOutQuit( 79200, 18000, 3600 ) }, 1092.5 )

1092.5 is the number of hardware clock ticks in one minute. Real clock
ticks in Clipper, emulated clock ticks in Harbour. And below is
TimeOutQuit(). FT_OnTick() sets it up to be called every 60 seconds (the
1092.5 clock ticks).

//===========================================================

function TimeOutQuit( nFromSec, nToSec, nTimeoutSec )

// Quit the application at night if idle
//
// TimeOutQuit() terminates the application if the keyboard has been
// idle for more than <nTimeoutSec> seconds and the time is between
// <nFromSec> and <nToSec> seconds after midnight.
//
// For example: If <nFromSec> is 79200, <nToSec> is 18000 and
// <nTimeOutSec> is 3600 the application will quit if the time is
// between 22:00:00 and 05:00:00 and no key has been pressed in
// the last 60 minutes

local nSeconds := seconds()
local nLastKeySec := LastKeySec( .F. )
local nSinceLast, lQuit := .F.

nSinceLast := nSeconds - nLastKeySec
if nSinceLast < 0 // if <nLastKeySec> was set yesterday
nSinceLast += 86400 // Add 24 hours
endif

if nSinceLast > nTimeOutSec // The timeout period is over
if nToSec < nFromSec // The quitting period includes midnight
if nSeconds > nFromSec .or. nSeconds < nToSec
// We are between <nFromSec> and midnight or
// between midnight and <nToSec>
lQuit := .T.
endif
else // The quitting period does not include midnight
if nSeconds > nFromSec .and. nSeconds < nToSec
// We are between <nFromSec> and <nToSec>
lQuit := .T.
endif
endif
if lQuit
dbcloseall()
quit
endif
endif

return NIL

//===========================================================

Regards,
Klas
Reply all
Reply to author
Forward
0 new messages