Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connects to sql but query won't run.
Message
De
21/12/2007 12:46:18
 
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 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01277033
Message ID:
01277036
Vues:
21
>lnConnHandle=SQLSTRINGCONNECT("DRIVER=SQL Server;SERVER=STRDBF02;APP=Microsoft Visual FoxPro;DATABASE=ADEPT5_GLSS;UID=reports;Password=reports")
>
>This my connection, It says I am connected but my query won't run. When I log in as a trusted connection it works fine. What am i missing.
>
>Thanks

You missing the check WHY it not runs:
lnConnHandle=SQLSTRINGCONNECT("DRIVER=SQL Server;SERVER=STRDBF02;APP=Microsoft Visual FoxPro;DATABASE=ADEPT5_GLSS;UID=reports;Password=reports")
IF lnConnHandle < 0
    AERROR(laError)
    MessageBox(laError[1,2])
    RETURN
ENDIF

IF SQLEXEC(lnConnHandle, query here, [CursorHere]) < 0
    AERROR(laError)
    MessageBox(laError[1,2])
    RETURN
ENDIF
...
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
Répondre
Fil
Voir

Click here to load this message in the networking platform