Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
1707 again ( sorry )
Message
From
01/10/2005 05:44:33
 
 
To
01/10/2005 03:51:41
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01055198
Message ID:
01055210
Views:
14
>Hi all,
>
>Apologize to bother you with well known 1707 error, but beleive me I have studied all available about that, tried some examples from UT (exactly as they were published here ! - as below) but nothing:
>
>First ON ERROR in case when I delete ( for test ) .CDX is never triggered ? - either I use some function or only RETRY. ( in case cdx is OK all works as expected ).
>
>For missing CDX I get this sequence of messages:
>
>A) error at L1 - structured CDX not found - Cancel - Ignore
>
>B) error at L2 - alias TIPOO is not found - Cancel - Ignore
>
>C) L3 with _try = 0
>
>D) L4
>
>
>code snipet:
>
>_try = 0
>*-
>   stErr = ON("ERROR")
>   ON ERROR   do goApp.GRESKA1() with "DATA\TIP_O", ERROR()           &&  or only RETRY
>   DO WHILE _try < 5
>      SELECT 0


****************
*** USED("DATA\TIP_O") this is incorrect, because you should to put a AliasName, not a filename
****************

 
>      if  !USED("DATA\TIP_O")
>          USE DATA\TIP_O  in 0 ALIAS TIPOO EXCL                        &&  L1
>          SELECT TIPOO                                                 &&  L2
>      else
>          MESSAGEBOX( "TABLE  PUT IN USE AT: " + str(_try)  )
>          exit
>      endif
>      IF !USED("TIPOO")
>          MESSAGEBOX( "TABLE  NOT  YET USED AT  TRY:" + str(_try) )    &&  L3
>          _try = _try + 1
>          loop
>      ELSE
>          MESSAGEBOX("TABLE  PUT IN USE AT FIRST CALL!")               &&  L4
>          EXIT
>      ENDIF
>   ENDDO
>   ON ERROR &stErr
>*......................
>   SELECT TIPOO
>   USE
>   CLOSE DATABASES
>
>
>TIA,  gojko
>
>PS
>(all spaces are "eated" so in preview text is not well looking as I see it while writing    ?)


I have not understood the problem that you have,  
but you can consider this.  
<PRE>
IF !USED("TIPOO")
	stErr = ON("ERROR")
	ON ERROR do goApp.GRESKA1() with "DATA\TIP_O", ERROR() && or only RETRY
	FOR _try=1 TO 5
		SELECT 0
		USE DATA\TIP_O ALIAS TIPOO EXCL && L1
		IF USED()
			EXIT
		ENDIF
		MESSAGEBOX( "TABLE NOT YET USED AT TRY:" + str(_try) ) && L3
	NEXT
	ON ERROR &stErr
	MESSAGEBOX( "TABLE OPEN AT TRY:" + str(_try) ) && L3
ENDIF
*......................
SELECT TIPOO
USE
CLOSE DATABASES 
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform