Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Syntax of SQLEXEC
Message
De
12/11/2004 12:15:50
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
00960758
Message ID:
00960911
Vues:
7
No,
one SQLPREPARE() it is sufficient,
this compile the command, BUT NOT DO ANY INSERT .
After, for every record you execute one SQLEXEC(lnAccess) only,
this fill the odbc parameters only and do the INSERT command.
IF SQLPREPARE(m.lnAccess,[INSERT INTO IFCOMPAN ( CID, CNAME1, CNAME2, CADDRESS1, CZIPCODE, CLOCALITY, CVATCAT,;
CCUSTYPE, CSUPTYPE, CCUSCAT, CCUSPAYDELAY ) VALUES (;
?code, ?nomteleph , ?nom2 , ?rue,?(cpays+ccp) , ?localite , 'N' , 'C' , 'U' ,;
?codePersonnel , 30)])>0
    SELECT BobClient
    SCAN
      =SQLEXEC(m.lnAccess)
    ENDIF
ENDSCAN
But this code have none error control!

>Fabio,
>
>thank
>
>Is just ?
>
>csql = [INSERT INTO IFCOMPAN ( CID, CNAME1, CNAME2, CADDRESS1, CZIPCODE, CLOCALITY, CVATCAT,;
>CCUSTYPE, CSUPTYPE, CCUSCAT, CCUSPAYDELAY ) VALUES (;
>?code, ?nomteleph , ?nom2 , ?rue,?(cpays+ccp) , ?localite , 'N' , 'C' , 'U' ,;
>?codePersonnel , 30)]
>
>
>_TALLY=0
>
>SELECT BobClient
>SCAN ALL
>IF SQLPREPARE(m.lnAccess,m.csql)>0
>
>SQLEXEC(m.lnAccess,m.csql)
>
>   * with buffering
>  *COUNT NOOPTIMIZE FOR SQLEXEC(m.mlnAccess)>0 AND TABLEUPDATE()
>ENDIF
>ENDSCAN
>
> COUNT NOOPTIMIZE FOR SQLEXEC(m.mlnAccess)>0
>
>IF _TALLY<m.BobClientCount
&gt;	WAIT WINDOWS 'ERRORS'
&gt;ENDIF
&gt;
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform