Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Capture SQL Passthrough error
Message
De
02/08/2002 11:00:59
 
 
À
02/08/2002 10:52:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00685447
Message ID:
00685455
Vues:
13
FoxPro will not give you the error generated in this case, but you can capture the sting sent to the SQL server as:

msql='INSERT INTO table1 (field1,field2,field3) VALUES '+;
'(?mfield1,?mfield2)'
if msql<1
_cliptext=msql && did not work
endif

then you can simply go to the query analyzer and "paste" that string. There, you can see where your error is.



>Does anyone know how to "capture" an error generated by SQL Server from a SQL Passthrough statement?
>
>Example: msql='INSERT INTO table1 (field1,field2,field3) VALUES '+;
> '(?mfield1,?mfield2)'
>
>obviously this INSERT statement would fail with a similar error message below:
>
>"There are more columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement."
>
>but is there anyway to capture this error (or any error really)?
>
>Thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform