Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A pseudo SEEK() Function to be used with SPT
Message
De
05/07/2002 13:11:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00675579
Message ID:
00675704
Vues:
9
>SELECT COUNT(*) FROM table WHERE field=99

I like this one. Below is the next "version" of SQLSeek, with your sugestions:
 Procedure SQLSeek
*--------- ------- 
 LParameters pHandle  , pTable, pWhereCondition
 Local       cOldAlias, bFound, cSelectStr

 cOldAlias  = Select ()

 cSelectStr = "Select Count (*) as SeekCount From " + pTableName + 
              IIf (! Empty (pWhereCondition), " Where " + pWhereCondition, "")

 SqlExec (pHandle, cSelectStr, "CurSQLSeek")
 
 Select CurSQLSeek
 
 bFound = SeekCount > 0

 Use In CurSQLSeek

 Select (cOldAlias)

 Return bFound

 EndProc                         &&  of SQLSeek
Thanks!

Fernando
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform