Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending doing replacing
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Appending doing replacing
Divers
Thread ID:
00110241
Message ID:
00110241
Vues:
47
Hi all,

I'm leaving tomorrow and will be gone all week, so if I don't get a reply today, I won't see it until next Saturday. (Just so you know I'm not ignoring you)

As people suggested in another thread, I have a stored procedure that gets the next key number. In the default of the key, it calls this function. The problem is that when I have that in the default, every record it appends goes on top of the last one, so I always have only one record.

Here's the procedure code:

procedure GetKey
parameter lcKeyName

local lnKeyNum

use KeyList in 0

locate for alltrim(KeyList.KeyName) = alltrim(lcKeyName)
replace KeyList.KeyNum with KeyList.KeyNum + 1
lnKeyNum = KeyList.KeyNum

select KeyList
use

return lnKeyNum

Here's what's in the default of the field clientkey: getkey('client')

What am I doing wrong?

Thanks,
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform