Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp50 - AUTO NUMBERING - SELECT not working?
Message
De
21/04/1997 13:33:42
Ed Cockrel
Datamarketing Network, Inc.
Nashville, Tennessie, États-Unis
 
 
À
21/04/1997 13:25:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00029119
Message ID:
00029125
Vues:
28
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform