Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error in stored proc
Message
From
26/10/2009 01:32:03
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
23/10/2009 13:38:40
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01430571
Message ID:
01431426
Views:
42
>two bugs exists here:
>1. the ERROR 1 remove the Record lock
>2. VFP ignore every RLOCK put into then db function
>
>FLOCK() is the only "strong" workaround
>
>
>CLEAR
>
>SET EXCLUSIVE OFF
>ON ERROR
>
>CREATE DATABASE mooh
>
>TEXT TO cHelp NOSHOW
>FUNCTION new_ix
> RETURN 12
>ENDFUNC &&New_IX
>ENDTEXT &&cHelp
>
>STRTOFILE(cHelp,'Help.txt')
>APPEND PROCEDURES FROM HELP.txt OVERWRITE
>
>CREATE TABLE test (ix I DEFAULT new_ix())
>
>USE test SHARED
>
>*runs fine
>APPEND BLANK
>
>TEXT TO cHelp NOSHOW
>FUNCTION new_ix
>	? ISRLOCKED(),ISFLOCKED()
> TRY
>   ERROR 1	&& this remove the RLOCK
>   =1
>  CATCH TO loException
>	? ISRLOCKED(),ISFLOCKED()
>	FLOCK()    && this work
>	* RLOCK() && vfp ignores this !!!!
> FINALLY
>	  ? ISRLOCKED(),ISFLOCKED()
> ENDTRY
> RETURN 1
>ENDFUNC &&New_IX
>ENDTEXT &&cHelp
>
>STRTOFILE(cHelp,'Help.txt')
>APPEND PROCEDURES FROM HELP.txt OVERWRITE
>
>DELETE FILE Help.txt
>
>*raises error
>APPEND BLANK
>
>CLOSE DATABASES ALL
>
>DELETE DATABASE mooh DELETETABLES
>
Hi Fabio,

thank you for your help. It (and the SET EXCLUSIVE) declares what happens.
But a surprising FLOCK() that will not be removed ... o oh.

Luckily I can code around the error (so I do other checks that the error will not raise).

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform