Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>Two separate machines bring up the same form using a parameterized date-range view. After one user on Machine A adds a record and saves it. Machine B then closes the form and reopens the form, but the added record doesn't show.
>>
>>Has anyone seen this kind of behavior before?
>>
>>I'm implementing an odd work around. When the form first opens I force a change by replacing one of the views fields with itself and then tableupdate the view. After this I call the requery. For some reason I can now see the other record.
>>
>
>I take it you have "Changed fields only" as the update type in your view definition? If you change this to "key fields" you won't need to do that silly replace before you do a TABLEUPDATE().
>
>Are you surethat Machine A is doing a TABLEUPDATE()? Are you sure the TABLEUPDATE is successful
Yes, Machine A is doing a successful TABLEUPDATE
Here's view definition of the code.
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'UpdateType', 1)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'WhereType', 3)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'FetchMemo', .T.)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'SendUpdates', .T.)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'UseMemoSize', 255)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'FetchSize', 100)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'MaxRecords', -1)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'Tables', 'wc!WorkOrdHdr')
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'FetchSize', 100)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'Comment', "")
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'BatchUpdateCount', 1)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'ShareConnection', .F.)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'Prepared', .F.)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'CompareMemo', .T.)
=DBSetProp('VWORKORDHDR_PDATERANGE', 'View', 'FetchAsNeeded', .F.)
Under the update criteria tab in the view designer tab, I see a "SQL WHERE clause includes". That is set to "Key and modified fields". The update type up above is either update or delete - insert. In this case it is update
I can post the rest of the view code if that would be helpful.
Dan
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement