Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sqlconnect problem
Message
 
À
07/07/2014 09:39:43
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 Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01603284
Message ID:
01603299
Vues:
52
>I am connecting to a paradox database using an ODBC system DSN.
>
>I have a DBC connection recorded and within the VFP IDE I can successfully extract data.
>
>However using the same DBC connection in a compiled program returns 'error 1466 Connection is invalid' on executing sqlconnect().
>
>Anyone any idea on what I am missing.

The error is Connection handle is invalid.
That means that you are not connected to your DB.
You ALWAYS should check what happens with every function that starts with SQL
lnConnection = SQLCONNECT(YourStoredConnection)
IF lnConnection < 0
   AERROR(laError)
   MessageBox("Can not connect to server. Reason: "+laError[1,2])
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