Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Son of Accused of Violations I'm not committing
Message
De
31/03/2005 05:22:06
 
 
À
29/03/2005 13:07:00
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00998499
Message ID:
01000212
Vues:
19
>>>>Phew!
>>>>
>>>>I seem to have cured this problem. Consider the following:
>>>>
>>>>Code for IRChange() of combo:
>>>>
>>>>With Thisform
>>>>  .txtRoute.Value	    = this.value
>>>>  .txtRoute.refresh()
>>>>  .cRouteNo	    = this.value
>>>>  .cDirectn	    = this.List( this.ListIndex, 3)	&& Directn is 3rd in list
>>>>  .txtDirectn.value   = .cDirectn
>>>>  .txtDirectn.refresh()
>>>>  .cmdPrint.enabled   = .T.
>>>>  .cmdPreview.enabled = .T.
>>>>EndWith
>>>>
>>>>
>>>>Having selected from the list box, the accompanying text box, .txtRoute, is assigned the value from the list box, taken from the select cursor/table. Now, whilst writing the form, I'd set its ControlSource to ROUTE.Route (its PK), but now I was "overwriting" it with the cursor's .Route (taken from select of the Route table). No immediate complaint from the form though, until I click the preview button. As I said in the orig message, the error was popping up somewhere between the two events, but not where it could be trapped. Strikes me that somewhere it should have said it didn't like it.
>>>>
>>>>Anyway, I cleared the text box's ControlSource and now don't get the error. Still don't understand why the message only happened on certain records and why in such a strange manner.
>>>
>>>Now this may explain it - as soon as it moved off the current record in Route, it tried to automatically tableupdate() it, and then you get the error (so I was wrong in the other message - the error was the correct one). I figure you have row buffering in Route, right?
>>
>>No, not at all. It wasn't necessary as the dialog is for printing only - no data are changed. And why should it be trying to TableUpdate() when thetre are no update transactions go8ing on?
>
>.txtRoute.Value = this.value
>
>That's where you changed a value in one of the tables. You may not think it merits a name of transaction, but nevertheless you've made your buffer dirty. And as soon as the record number in that table changes, with row buffering there's the automatic tableupdate. A transaction happening behind your back... makes you wish for aGremlinInfo(), eh?

Hey, Dragan


I can appreciate that the above line would change a value in the Route table - granted, but, as I said, there is no table buffering, either at the form or the table level. So how would a Tableupdate() be issued implicitly? Yes, aGremlinInfo() would be a useful tool :-)
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform