Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Message Alias RegTemp Not Found
Message
From
11/10/2001 14:48:25
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
11/10/2001 11:11:36
Ashish Patel
Hindustan Petroleum
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00566999
Message ID:
00567162
Views:
14
>I am getting an error
>
>
>"Alias REGTEMP Not Found"
>
>that to only in EXE file and that to if I run the same option say 5 to 6 times then only I get this error.
>
>My form is having 1 text box 1 grid (Name : grdtempReg recordSource = tempreg) and 2 buttons save and exit.

[code snipped]

>Is it because of SYS(3) Function or something else.

Could be. You're issuing sys(3) in two consecutive rows, and it may be too fast for this function. You may do
filename2=sys(3)+'.dbf'
do while filename1=filename2
   filename2=sys(3)+'.dbf'
enddo
but I'd recommend a few other things:

- don't create dbf, create cursor with the alias you need. They disappear when you close them, no need to use any cleanup, and you don't have to use sys(3) - VFP does it for you. You also don't have to close them and reopen with a meaningful alias - you have the alias right away. Much cleaner and less code to write.

Further on, the files you create with sys(3) this way go to the same directory; in a network you run a chance of two users getting the same filename, and your directory gets cluttered. Cursors go to your local drive instead, which means they'll never collide with other users, and will be much faster and will induce far less network traffic.
- using & for filenames will not work if you have spaces in your path. You were not including paths here, so it worked (almost), but in general, if you have a filename in a variable, don't "use &tablename", rather "use (tablename)".

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform