Hi Chaim,
It looks like this is bound to the way SYS(2015) works. it generates a unique value out of datetime
today it looks almost like _1000*.
you cut the first to signs, it will result in 000* any variable name, tablename or the like must start with a character betweeen 'a'..'z' or underscore '_'.
Simple remove the substr() from your udf. It will work better without
Agnes
>I have a big and strange bug:
>We have a function that creating a cursor with name acc the sys(2015).
>the cursor calld 'gettempalias'.
>here is the function syntax:
Local cRetvalue
>cRetvalue=substr(sys(2015),3,10)
>If used(cRetvalue)
> Use in &cRetvalue.
>Endif
>Return cRetvalue
>The function worked very good in many places in the project.
>for example:
cAlias=thisform.gettempalias()
> SELECT name,id;
> from prudact ;
> into cursor &cAlias. nofilter ;
> where sprudact.usefor=.t. ;
> order by 1
>Today we started to get error message 'Syntax error' on this function in all the places in the program.
>I moving back the system date and the program working good, but if I use with date of today (or later) I getting the bug.
>***********************************************************************
>Someone can resolve it?
>Thank you
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.
OffThere is no place like [::1]