Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC and SQL commands
Message
From
07/04/1998 21:19:13
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
ODBC and SQL commands
Miscellaneous
Thread ID:
00090321
Message ID:
00090321
Views:
59
I am trying first to communicate with a vfp50 database container from fpw2.6. I have set up the odbc driver for database containers using Intersolv's Data Direct odbc drivers. I have logged the created driver in the ODBC.INI and have also created two different data sources using the same driver.

Thus far, I am using the dbconnect() and dbexec() function calls from fpsql.fll in the fpw2.6 connectivity kit. When I issue the first command:
myhandle=dbconnect("mydata","","","")
It produces a connection handle. At first glance, this indicates to me that the driver was at least functioning correctly. When I issue the next command:
nsuccess=dbexec(myhandle,"use engines")
It returns a 1 to nsuccess, indicating success. However, when I issue the following command:
nsuccess=dbexec(myhandle,"select all from engines")
I am greeted by a return value of -1. The syntax of the function states that this indicates a connection level error.

I have two questions.
1. Does the connection level error on the third command indicate a deficiency in my driver, or my use of sql?

2. Does anyone have any insight on how I might successfully use sql statements to access the data in the container.

Once these questions are answered, I will apply the solution to odbc queries back to a different data source.

------------------------------
Ray Heilman <><
Next
Reply
Map
View

Click here to load this message in the networking platform