Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC Driver Install?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00953292
Message ID:
00953332
Views:
25
HI Jeff,

This Key must exist,

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\INTERSOLV InterBase ODBC
Driver (*.gdb)]


or You can call ODBC function SQLDrivers:
LOCAL lihEnv,liDSN,liDescript,liDirection,liRet,;
      lcDsn,lcDescript,lii

#DEFINE SQL_FETCH_NEXT 1
#DEFINE SQL_FETCH_FIRST 2
#DEFINE MAX_STRING 128
#DEFINE SQL_SUCCESS                0
#DEFINE SQL_SUCCESS_WITH_INFO      1
#DEFINE SQL_NO_DATA              100
#DEFINE SQL_ERROR                 (-1)
#DEFINE SQL_INVALID_HANDLE        (-2)

DECLARE INTEGER SQLDrivers IN ODBC32.DLL  INTEGER, SHORT ,;
              STRING @, INTEGER , ;
              INTEGER @, STRING @, INTEGER , INTEGER @

lihEnv = VAL(SYS(3053))&& The hEnv (converted to a number)
liDSN = 0              && How many were actually returned
liDescript = 0         && How long the description actually was
lii=0
liDirection = SQL_FETCH_FIRST  && The first time start at the top
liRet = SQL_SUCCESS            && Start with no errors
DO WHILE (INLIST(liRet,SQL_SUCCESS,SQL_SUCCESS_WITH_INFO))
   lcDsn = SPACE(MAX_STRING+1) && Make sure there is enough space
   lcDescript = SPACE(MAX_STRING+1)

   liRet = SQLDrivers(lihEnv, liDirection, @lcDSN, MAX_STRING, @liDSN, ;
                           @lcDescript, MAX_STRING, @liDescript)

   IF liRet = SQL_SUCCESS
      lii=lii+1
      ?LEFT(lcDSN, liDSN),LEFT(lcDescript, liDescript)
   ENDIF
   * We only want to do the SQL_FETCH_FIRST the first time
   liDirection = SQL_FETCH_NEXT
ENDDO
MartinJ

>I know someone has already done this from FoxPro. I've looked in the articles and download but could not find any thing. Here is what I'm trying to do.
>
>We have a FoxPro app that reports Parts Per Million stuff. All info to date has been coming from fox tables. Now I need to be able to pull info from a third party data program. This program uses INTERSOLV InterBase ODBC Driver 3.11.01. Problem is the drive is not located on the clients. I really don't want to have to install this driver manually on all the pcs. Can I have my fox app install the drive on those machines for me? With no user actions needed?
>
>
>Jeff
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Reply
Map
View

Click here to load this message in the networking platform