Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp50 - AUTO NUMBERING - SELECT not working?
Message
From
21/04/1997 14:02:19
 
 
To
21/04/1997 13:33:42
Ed Cockrel
Datamarketing Network, Inc.
Nashville, Tennessee, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00029119
Message ID:
00029137
Views:
29
>>I have coded the AUTO NUMBERING... I am having problems...
>> When I append and I go get my next number, my code
>>says:
>> SELECT counter.dbf
>> etc...
>>
>> this works.. when I SAVE.. My code says:
>> SELECT counter.dbf
>> etc..
>>
>> Debug stops me at the SELECT and says..
>> ALIAS NOT FOUND.
>>
>> The second time I say SELECT, I have problems.
>> I have added the counter.dbf to the database
>> and to the datavironment.
>>help..
>>
>Heres my copy for auto numbering. It is a stored procedure in the master
>dbc.
>FUNCTION NewID(tcAlias)
> LOCAL lcAlias, ;
> lcID, ;
> lcOldReprocess, ;
> lnOldArea
> lnOldArea = SELECT()
>
> IF PARAMETERS() < 1
> lcAlias = UPPER(ALIAS())
> ELSE
> lcAlias = UPPER(tcAlias)
> ENDIF
>
> lcID = ""
> lcOldReprocess = SET('REPROCESS')
>
>
> SET REPROCESS TO AUTOMATIC
>
> IF !USED("SETUP")
> USE WORK!SETUP IN 0
> ENDIF
> SELECT SETUP
>
> IF SEEK(lcAlias, "setup", "key_name")
> IF RLOCK()
> lcID = setup.value
> REPLACE setup.value WITH ;
> STR(VAL(ALLT(lcID)) + 1, LEN(setup.value))
> UNLOCK
> ENDIF
> ENDIF
>
> SELECT (lnOldArea)
> SET REPROCESS TO lcOldReprocess
>
> RETURN lcID
>
>hope this helps.

thanks Ed for the code...I will check it out..
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Previous
Reply
Map
View

Click here to load this message in the networking platform