Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange error message - any ideas
Message
From
15/12/2005 16:27:26
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01078433
Message ID:
01078468
Views:
12
I didn't make myself clear, this was a one shot error, this piece of code runned hundreds/thousands times without error, so globally/normally it works. I'm just curious as what the select statement means since it's not part of my code.


>>It's a private datasession and PESHPACT is the name of the view (the alias name in the DE).
>
>I doubt about that. Usually there are default names like "Cursor1" unless you explicitly rename the cursor.

Yes we do explicitly rename each cursor. It makes the code easier to read.

>
>>So you think that the select statement is part of the internal VFP default mechanism?
>
>I do not know. It may depends on the definitions and structure of the view/dbf/database that are in use.
>
>Anyway, if you are sitting on the proper table and on the proper record, then you do not need to add "IN" while replacing.

Putting the "IN" is an habit, just in case later on we add extra code that move the focus, and anyway it shouldn't hurt.

>
>>
>>
>>
>>
>>>If form has a private datasession, then it uses the updatable view/cursor of a table, not table itself, and there is a default mechanism for table update etc.
>>>Most likely you need to replace in the view, and then issue tableupdate. The name of the view you can get from the form.dataenvironment.
>>>
>>>
>>>
>>>>Hi everyones,
>>>>
>>>>A client of mine got an error which I don't understand.
>>>>It says "record in use by another user " this I understand although I'm not sure it was true.
>>>>
>>>>Then it gives me the method and the line, in my code the line is this :
>>>>REPLACE nK WITH lnK, nKTrans WITH lnKSeason IN PESHPACT
>>>>
>>>>I'm updating the current record in the table PESHPACT, it's sort of make sense with the error and I'm ok with that.
>>>>
>>>>But at the very end it shows this line as information, which I don't understand :
>>>>
>>>>SELECT PESHPACT.cShpActID,Recno() as cRecNo FROM PESHPACT ORDER BY PESHPACT.cShpActID into cursor Viewcalv96
>>>>
>>>>How can a REPLACE statement be translated into a select statement, is it something VFP is doing by itself?
>>>>
>>>>BTW, the form has it's own datasession, the table PESHPACT is in buffer mode 5 and all indexes are define as regular index, so VFP doesn't really know what is the unique key in this table.
>>>>
>>>>Thanks
>>>>Diane Robitaille
Diane Robitaille eng.
Previous
Reply
Map
View

Click here to load this message in the networking platform