Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Recall by SQLEXEC
Message
 
 
À
06/06/2002 10:45:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00665359
Message ID:
00666624
Vues:
20
To elaborate, the following Stored Proc does work:
PROCEDURE RecallRecord
   LPARAMETERS tcTable, tcFilter
   IF VARTYPE(tcTable) <> "C" OR EMPTY(tcTable)
      RETURN -1
   ENDIF
   IF VARTYPE(tcFilter) <> "C" OR EMPTY(tcFilter)
      RETURN -1
   ENDIF
   LOCAL lnSelect
   lnSelect = SELECT()
   IF NOT USED(tcTable)
      USE (tcTable) IN 0 AGAIN
   ENDIF
   SELECT (tcTable)
   SET DELETED OFF
   RECALL FOR EVALUATE(tcFilter)
   SET DELETED ON
   SELECT (lnSelect)
   RETURN 1
ENDPROC
I then deleted a bunch of records in a zipcodes [zips] table, then called the SP:
SQLEXEC(lnHandle, 'select RecallRecord([zips], [mod(zips.keyid,2) = 1]) from dummy', 'crsTest')
The second parm is a filter to recall only records whose KeyID field is odd. What is notable is that you can not use macro expansion in a stored proc that is to be called via ODBC/SPT. When I did, I got an ODBC error -- feature not available.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform