Yet again I've encountered weird behavior with dBase 5 for DOS in the Windows environment and so here's my documentation of this issue. Previously I reported SCAN/ENDSCAN issues, SEEK/FOUND() issues and failed field replaces in newly indexed tables as described in thread290-882126.
Each issue is a little different but here is the overall environment: dBase 5.0 for DOS, the program files and the data files are all running on a Windows 2000 or 2003 Server.
This new problem is that I get the error "Variable not found" under the following circumstances:
myArray[myFldNum]="fails"
myArray[AliasName->myFldNum]="succeeds"
myArray[VAL(myFldChar)]="fails"
myArray[VAL(AliasName->myFldChar)]="fails"
The workaround is to save the desired field value to a memory variable then do the array field replacement using that variable:
myTempVar = VAL(AliasName->myFldChar)
myArray[myTempVar]="succeeds"
Another bug I've known for years is that ID() returns the logged in user name in a NetWare network but with a Windows Server network it returns the computer name. In both cases the program adds a 1, 2, etc. to the returned name for each session/window running on the computer. With Win98/98se/Me you're up a creek trying to figure out who's logged in for security verification. With Win2000/XP you can get the user name with GETENV("USERNAME").
dbMark
Each issue is a little different but here is the overall environment: dBase 5.0 for DOS, the program files and the data files are all running on a Windows 2000 or 2003 Server.
This new problem is that I get the error "Variable not found" under the following circumstances:
myArray[myFldNum]="fails"
myArray[AliasName->myFldNum]="succeeds"
myArray[VAL(myFldChar)]="fails"
myArray[VAL(AliasName->myFldChar)]="fails"
The workaround is to save the desired field value to a memory variable then do the array field replacement using that variable:
myTempVar = VAL(AliasName->myFldChar)
myArray[myTempVar]="succeeds"
Another bug I've known for years is that ID() returns the logged in user name in a NetWare network but with a Windows Server network it returns the computer name. In both cases the program adds a 1, 2, etc. to the returned name for each session/window running on the computer. With Win98/98se/Me you're up a creek trying to figure out who's logged in for security verification. With Win2000/XP you can get the user name with GETENV("USERNAME").
dbMark