Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sqlconnect problem
Message
From
08/07/2014 02:42:34
 
 
To
07/07/2014 09:39:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01603284
Message ID:
01603299
Views:
54
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform