Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot update the cursor
Message
De
08/10/2008 06:54:04
 
 
À
08/10/2008 06:48:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01353585
Message ID:
01353597
Vues:
23
>>>Hi Tore
>>>
>>>Yes, that's the construct I would use, but just:
>>>
>>>
>>>>REPLACE REFERENCE WITH ALIAS.REFERENCE in cPX_PRODUCTS
>>>>
>>>
>>>Now, are you clutching at straws for an answer (it's a long shot but it just might work) or are you saying that's the error? Because 1) I haven't been able to replicate the error, 2) it would mean a tortuous, source controlled update process to the customer, only to "suck it and see" and I couldn't predict if/when he'll get the error again.
>>
>>I don't know if this will fix your problem, but at least it's the "correct" way to do it. The added ..in yourtable.. will make sure that the updated will happen even if you are on the "phantom record" in the selceted work area. Another shot in the dark, could this user have little space left in his/her temp directory?
>
>Thanks Tore
>
>Yes I was aware of the preference in using "in my Table" on the replace. But they do use:
>
>
>Replace TableName.FieldName with ...
>
As I wrote, this syntax will work unless you are at the "phantom" record, record number reccount()+1, in the active work area. That's why this syntax is a no-no in real life.

>a lot here!
>
>I've since experimented with selecting a cursor into one with the same name (I've never done that before) and realised it can be done without alias clash.
>
>As for the temp dir suggestion, that has been given to the user last time this error happened, a few years ago
>
>>
>>Regarding selecting form a cursor into a new cursor with the same name, that's safe and sometimes a real timesaver. I use this for instance for wildcard searches in a table, a la google, where my users types in different words in a textbox, and want all the records where all the words are in this table. My code is something like
>>lcTarget='curDummy'
>>For x=1 to getwordcount(lcLongText)
>>   if x=1
>>      lcTable='mybigtable'
>>   else
>>     lcTable=lcTarget
>>   endif
>>   lcText=upper(getwordnum(lcLongText,x))
>>   select from (lcTable) where lcText$upper(field1+'|'+field2+|+field3) into cursor (lcTarget) readwrite
>>Endfor
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform