Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function Problems
Message
De
18/11/1999 14:16:45
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
 
 
À
18/11/1999 13:27:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00292472
Message ID:
00292629
Vues:
17
Craig,

It did - I'm getting "Table has no index order set" on SET ORDER TO TAG TABLE and don't know why.
your instructions were crystal clear - I think.

JD



>>FUNCTION GetKey
>>LPARAMETERS tcTable
>>
>>LOCAL lnArea, llOpened, liRetVal
>>
>>* Save current work area
>>lnArea = SELECT()
>>llOpened = .F.
>>
>>IF !USED("Keys")
>> USE Keys IN 0 SHARED
>> llOpened = .T.
>>ENDIF
>>SELECT Keys
>>SET ORDER TO TAG Table
>>
>>I used GetKey("MyTableName") in the default of the Primary key
>>in this table to generate a incremented number. what am i doing
>>wrong?
>>
>>
>>* FLOCK seems to work a bit better than RLOCK.
>>* I've never had a problem with it.
>>DO WHILE !FLOCK()
>>ENDDO
>>
>>SEEK UPPER(tcTable)
>>IF FOUND()
>> liRetVal = NextId
>> REPLACE NextId WITH NextId + 1
>>ELSE
>> INSERT INTO Keys (Table, NextId) VALUES (tcTable, 2)
>> liRetVal = 1
>>ENDIF
>>
>>FLUSH
>>UNLOCK
>>
>>IF llOpened
>> USE IN Keys
>>ENDIF
>>
>>SELECT (lnArea)
>>RETURN liRetVal
>
>
>Jimmy,
>
>That code looks like it came from my web site. What exactly is the problem you are getting?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform