Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange error
Message
From
22/10/2014 08:40:22
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
22/10/2014 08:14:13
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01609570
Message ID:
01609757
Views:
64
>>>Hi All,
>>>
>>>This's very strange for me. Occurs sometimes at customers, never happened me or our testers. Just a simple code:
>>
>>>this line gives "Alias name is already in use" error. But I close table at the second line. How can this error occurs?
>>
>>Other than what Lutz said about a timer, I think your code should run just fine, you could simplify it thou, and because you would be closing it (if necessary) and opening it in the same sentence this might help, as it will not be interrupted by a timer, AFAIK
>>
>>
>>
>>If !File(xlngfile)
>>	Return nesne
>>Endif
>>
>>Use (xlngfile) Alias Language Again Shared in Select('Language')
>>select Language && if you need Language to be the current selected table
>>
>
>I put :
>
>Use (xlngfile) Alias Language Again Shared In Select("language")
>
>and now it gives "alias name already in use" error. I'll lost my mind. How can this be done (Also timer is disabled at this time).

For such strange moments I only see the following ways:

somebody does not realease the cursor used by language

#1 (as suggested before)
open debugger. Place something like SELECT("language") in Watch window and set a breakpoint to it. Prog should stop when SELECT changes.
Problem here is that it fires when the DATASESSION is changing too. So possibly something like
!(SET("Datasession")=yournumber AND !EMPTY(SELECT("language")))
is better here. It will fire the moment the language alias will be used.

#2
Activate SET COVERAGE TO and SET EVENTLOG TO (all events, but don't use the mouse!) around your code snippet
see what is inside.

#3
If you go back to the original code and try:
SET ASSERTS ON
If Used("language")
	Select Language
	Use
Endif

assert !Used("language")

If !File(xlngfile)
	Return nesne
Endif

Select 0
assert !Used("language")
Use (xlngfile) Alias Language Again Shared //----error occurs at this line
Does it stop??

#4 any non VFP stuff bound to this alias?

#5 anything bound to this alias?

#6 how is the old language alias created?
IOW All of the CURSORGETPROPS(*)
and DBF('language')

#7>> Does the following work?
Use (xlngfile) Alias Blabla Again Shared in Select('blabla')
So just to make sure the error is not in xlngfile and VFP is kidding with an unrelated error message.

??
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
Next
Reply
Map
View

Click here to load this message in the networking platform