Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete duplicate records
Message
 
 
To
11/09/2006 04:13:23
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01152639
Message ID:
01152769
Views:
18
It's possible the table is already in use by another user or data session. I again suggest you step through this code a line at a time with the debugger. Use the Watch window, or hover over variable names in the Trace window, to examine values until you spot the problem. A couple of values you might want to watch are ALIAS() and SET('EXCLUSIVE').

>hi,
>thank you for reply,
>
>i try as under i get error message ...
>
>1.file is in use
>
>after ignore
>2.alias is not found
>
>CLOSE ALL
>USE ALLTRIM(thisform.text3.value) exclusive
>index ON(ALLTRIM(thisform.text1.value)) TAG (ALLTRIM(thisform.text1.value))
>select sys(2015) as SortOrder,* from ALLTRIM(thisform.text3.value) ;
> order by 1 descending ;
> into cursor crsTemp nofilter
> SELECT ALLTRIM(thisform.text3.value)
> zap&&file is in use
>select crsTemp
>scan
> if !seek(ALLTRIM(thisform.text1.value),'(ALLTRIM(thisform.text3.value))','(ALLTRIM((thisform.text1.value))')&&Alias is not found
>   scatter memvar memo
>   insert into (ALLTRIM(thisform.text3.value)) from memvar
> endif
>endscan
>brow
>
>
>thanks
>
>>I see a couple of problems. The line
>>
>>SELECT (thisform.text3.value)
>>
>>will not work because you have closed all work areas with the initial CLOSE ALL, and opened only the table referenced by thisform.text3.value.
>>
>>You may also need to use ALLTRIM() on those textbox values. I would set a breakpoint on the first line in that code and then step through it in the debugger. It wouldn't surprise me if the USE ... EXCLUSIVE command in the second line fails. After it executes, look at the value of ALIAS() or DBF().
>>
>>As a general comment, you want to do more robust error checking in your code. Don't assume the value in a textbox is a valid table name.
>>
>>
>>>hi all,
>>>any idea, help
>>>i try to run this code under via myform i get error message
>>>
>>>file must be opend exclusivly ?
>>>
>>>CLOSE ALL
>>>USE (thisform.text3.value) exclusive
>>>index on (thisform.text1.value) TAG(thisform.text1.value)
>>>select sys(2015) as SortOrder,* from (thisform.text3.value) ;
>>> order by 1 descending ;
>>> into cursor crsTemp nofilter
>>> SELECT (thisform.text3.value)&&& error message above
>>> BROW
>>>zap
>>>select crsTemp
>>>scan
>>> if !seek(thisform.text1.value,'(thisform.text3.value)','(thisform.text1.value)')
>>>   scatter memvar memo
>>>   insert into (thisform.text3.value) from memvar
>>> endif
>>>endscan
>>>brow
>>>
>>>
>>>but i try as under it works
>>>
>>>CLOSE all
>>>*use AMMAN_REGION exclusive
>>>*USE alldat exclusive
>>>USE ADSL_ALL exclusive
>>>index on CLIENT tag CLIENT
>>>select sys(2015) as SortOrder,* from ADSL_ALL ;
>>> order by 1 descending ;
>>> into cursor crsTemp nofilter
>>>select ADSL_ALL
>>>zap
>>>select crsTemp
>>>scan
>>> if !seek(CLIENT,'ADSL_ALL','CLIENT')
>>>   scatter memvar memo
>>>   insert into ADSL_ALL from memvar
>>> endif
>>>endscan
>>>brow
>>>
>>>
>>>thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform