Dear All,

I've a vfp apps that will extract data from drive mappings
continuously e.g. select * from n:\data\t_inv
where....However if the mapping N: is lost, the apps stop
and show an open dialog box in the START bar, I've to
close it manually otherwise it will never run again even
the N: is back to normal.

I've already add a lot of checking before the select
command like IF FILE("N:\DATA\T_INV.DBF) but still didn't
fixed, is there way to skip the open dialog box?

Thank you for your time!

Re: Open dialog box by Martin

Martin
Tue Dec 02 01:45:21 CST 2003

Try :
IF NOT FILE("N:\DATA\T_INV.DBF)
* any ERROR
RETURN .F.
ENDIF

USE N:\DATA\T_INV.DBF IN 0 SHARE
IF NOT USED('T_INV')
* any ERROR
RETURN .F.
ENDIF

* now is table opened and no Open Dialog ....
select * from n:\data\t_inv
*-- your code
USE IN T_INV

Martin

"Chris Tang" <christang@proan.com.hk> píse v diskusním príspevku
news:07ac01c3b89c$5de7d7f0$a301280a@phx.gbl
> Dear All,
>
> I've a vfp apps that will extract data from drive mappings
> continuously e.g. select * from n:\data\t_inv
> where....However if the mapping N: is lost, the apps stop
> and show an open dialog box in the START bar, I've to
> close it manually otherwise it will never run again even
> the N: is back to normal.
>
> I've already add a lot of checking before the select
> command like IF FILE("N:\DATA\T_INV.DBF) but still didn't
> fixed, is there way to skip the open dialog box?
>
> Thank you for your time!



Re: Open dialog box by Dan

Dan
Tue Dec 02 11:54:19 CST 2003

The FileOpen dialog will appear any time you do something that expects an
open DBF and you don't have an error handler in place via ON ERROR or an
Error() method. (Or try/catch if you're using vfp8.)

It's vfp being helpful. <g>

Try this in the command window:

CLOSE ALL
BROWSE && you should get the dialog
CLOSE ALL
ON ERROR WAIT WINDOW NOWAIT "Error!"
BROWSE && no dialog

Dan

"Chris Tang" <christang@proan.com.hk> wrote in message
news:07ac01c3b89c$5de7d7f0$a301280a@phx.gbl...
> Dear All,
>
> I've a vfp apps that will extract data from drive mappings
> continuously e.g. select * from n:\data\t_inv
> where....However if the mapping N: is lost, the apps stop
> and show an open dialog box in the START bar, I've to
> close it manually otherwise it will never run again even
> the N: is back to normal.
>
> I've already add a lot of checking before the select
> command like IF FILE("N:\DATA\T_INV.DBF) but still didn't
> fixed, is there way to skip the open dialog box?
>
> Thank you for your time!