Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange Error Message
Message
 
 
À
25/03/2011 13:29:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01504918
Message ID:
01505009
Vues:
33
>>Rich,
>>
>>
>>* Your code:
>>IF EMPTY(tcSql)  && Processing via an SQLPREPARE() statement
>>	tcSql = " "   && So Error Routine has character value
>>	lnResult = SQLEXEC(tnConnection)                                 &&     ?????
>>
>>
>>What does it mean? What is exatly tnConnection? And what is your sqlprepare line looks like?
>
>From the help:
>"SQLPREPARE( ) sends the SQL statement to the data source where it is compiled for faster execution. After the SQL statement is compiled, it can be executed with SQLEXEC( ). If SQLEXEC( ) is used to execute a SQL statement prepared with SQLPREPARE( ), only the statement handle is required in SQLEXEC( )."
>
>
>In my case it could be something like
>lcSql = "UPDATE myTable SET myField = ?myValue WHERE pk = ?mypk"
>IF oDataClass.prepare(tnConnection,lcSql)
>  SCAN
>    mypk = table.pk
>    myvalue = table.value
>    IF NOT oDataClass.sql_execute(tnConnection,lcSql)
>      ** Error Handling Code
>    ENDIF
>  ENDSCAN
>ELSE
>  ** Error Handling Code
>ENDIF
>
>***oDataClass.prepare
>LPARAMETERS tnConnection,tcSql
>=SQLPREPARE(tnConnection,tcSql)
>** With appropriate error handling
>
Yuri question is what happens when you don't pass lcSQL? Are you passing the handle in this case?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform