Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resetting the Registry Counter
Message
From
22/10/2004 19:40:25
 
 
To
22/10/2004 19:29:46
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00953563
Message ID:
00953931
Views:
13
Hmmm...
Thanks for the answer. It just hit me though that the intent behind the appdata is that it should be used as the dbc for the appdata (doh!) rather than creating another dbc. That just never occurred to me.

Mike
>Hi Mike:
>
>>I have a DBC called BCSCommon, which has the BCSTypes.dbf. I am accessing it thru a cmcursor class and lautopk is .t.
>
>Ahh, I see now.
>
>>Without any intervention on my part when I run a program to load the cursor, I find that codemine has created a registry >entry which is not under the Shared.Counters but under %%Bcscommon_appreg01.Counters.Primary Key Bcstypes.
>
>When lAutoPK is set True, then Codemine will automatically call its PrimaryKey() function. In this case, the table in question belongs to a DBC other than the standard AppData.dbc that Codemine sets up, in your case BCSCommon. Codemine keeps its Appreg01 table in the DBC. When PrimaryKey() tries to create a PK for BcsTypes it routinely checks to see which DBC the table belongs to. In this case, it finds that BcsTypes belongs to BCSCommon. It then checks in BCSCommon to see if there is a table called appreg01. If there is not, it creates a brand new Appreg01 in BCSCommon. This will now hold counters and the like for any tables that belong to BCSCommon.
>
>When Codemine wants access to the shared registry for any particular table, it needs to load the appreg01 in question. However, in your case, there is more than one Appreg01 so, Codemine loads them prefaced with the name of the "owning" DBC and an underscore character.
>
>The mistake you are making in this circumstance is simply specifying the underscore in the key value. If you think about basic VFP, you tell Fox which DBC a table belongs to by using the ! character. However, you cannot use this character value (!) in a work area name so, Codemine uses the underscore character in its place and this is what is fooling you.
>
>Therefore, try the following to access the key in question and you should get a better result <s>.
>
>
>oCounter = goapp.oregistry.lockcounter('%Bcscommon!appreg01.Counters.Primary Key Bcstypes')
>
>
>Simply put, replace the underscore with an exclamation character so that Codemine knows in which DBC to find the Appreg01 table in question.
>
>>p.s. are you available for consulting?
>
>Yes I am.
>
>Hope this helps,
Previous
Reply
Map
View

Click here to load this message in the networking platform