Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updates are happening every time instead of when necessa
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Stonefield
Divers
Thread ID:
00392465
Message ID:
00392697
Vues:
9
I have had it fail when there is a problem with a primary key [e.g., records with duplicate keys which SDT can not fix].

You should check SDTs error properties for failure reasons. I would also change your update command to:

llRetVal = oMeta.oSdtMgr.Update('CHARGES!ALL')

Then, if llRetVal is FALSE, you can check the error properties for reasons why.

>Why would the update be happening on every load of the application?
>PUBLIC oMeta
>
>oMeta = NEWOBJECT('DBCXMgr', 'dbcxmgr.vcx','',.f.)
>IF VARTYPE(oMeta) = 'O' AND NOT ISNULL(oMeta)
>	OPEN DATA charges SHARED
>	oMeta.SetDataBase(DBC())
>	IF oMeta.oSdtMgr.NeedUpdate('CHARGES!ALL')
>		oMeta.oSdtMgr.Update('CHARGES!ALL')
>	ENDIF
>
>	OPEN DATA appdata SHARED
>	oMeta.SetDataBase(DBC())
>	IF oMeta.oSdtMgr.NeedUpdate('APPDATA!ALL')
>		oMeta.oSdtMgr.Update('APPDATA!ALL')
>	ENDIF
>ELSE
>	WAIT WINDOW 'The application will now be shut down because the meta data object could not be created.'
>ENDIF
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform