Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NewID in COM components
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00318189
Message ID:
00318911
Vues:
25
>>>>I don't know if this has come up before, but the SET REPROCESS TO AUTOMATIC in NewID() probably isn't the greatest idea for COM objects, since it assumes a UI to display the message.
>>>
>>>Check out Sys(2335, n)
>>>
>>>BOb
>>
>> OK, so now you're not left wondering why your component locked up. Hmm...I wonder if this get's set in MM when you compile as COM. Probably should be.
>
>No... if you read the docs you will see that this will cause a waitstate UI to raise an error... Non-wait state UI is ignored... I think in this case you would have a non-wait state UI.
>
>If it is a wait state UI you could add this check to the error message of the data behavior class so that it can be delt with.
>
>

I see. But is this really any better? You've got a non-UI COM object waiting to get a record lock. If it works, great. If it doesn't, you're left wondering what happened to your object - it never returns control back to your UI. Granted, the circumstances where that might happen should be pretty rare. But I know I'd end up spending a lot of timing trying to figure out why my app. "locked up" for no apparent reason. At least with an error you have someplace to start. Setting REPROCESS to something reasonable for an in-proc COM object is a good alternative.

>Of course, an easier solution might be using GUID's for Primary Key values.

Might be.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform