Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLExec & SQLPREPARE not being executed
Message
 
À
03/08/2011 09:34:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01520048
Message ID:
01520057
Vues:
53
>Hello Fox/SQL experts :)!
>
>Yesterday i got help in writing this handle
>
>
>IF SQLExec(m.Handle, "SELECT * FROM useraccess", "test") " more than " 0
>but the thing is, i dont see the cursor "test" in the Data enviroment, i cant selcet it nor can i browse, the reason why im also wondering if this even executing is because if i do "Select *from peterpan" (peterpan being a table that doesnt exist) it doesnt error out on that line
>
>
>
>
>
>ive played around with it and changed it to
>
>SQLPREPARE(m.Handle, 'SELECT * FROM useraccess', 'test')
>SQLEXEC(m.Handle)
>
>but that doesnt seem to solve the problem

Ken,
there is a SQL Server tool named SQL Profiler.
You can tun it and see what query you sent to SQLServer.
Than you can copy and paste this query in SSMS and see the result.

BTW you ALWAYS should check the result or any of SQL* functions:
lnResult =  SQLEXEC(........)
DO CASE
   CASE lnResult < 0
        AERROR(laError)
        MessageBox(laError[1,2])
        RETURN
   CASE lnResult = 0
        ** Query still executes.
        ** You must wait here untill some resukt
OTHERWISE
        *** Success
ENDCASE
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform