Skip to Main Content
  • Questions
  • How do I access data from a Foxpro(6.0) database

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, Trisha.

Asked: March 02, 2017 - 3:35 am UTC

Last updated: March 03, 2017 - 5:38 am UTC

Version: 11.2.0.4

Viewed 1000+ times

You Asked

Dear Sir,

How do I access data from a Foxpro(6.0) database from Oracle 11g in Linux platform? I have already installed oracle Gateway, but still I need a Linux 64bit ODBC driver for FoxPro. I have tried accessing your old posts but failed ( http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76960/hs_genco.htm#173 ). I believe it's taken out since ODBC drivers for FoxPro doesn't exist anymore? Is there a work around to access data from FoxPro to Oracle?

Thank You

Trisha

and Connor said...

Wow....foxpro :-)

If you cannot find a linux odbc driver for foxpro, I'd say you probably need to look at doing some 'hops', eg

- Install a small Windows Oracle database
- Add a windows odbc driver to foxpro
- Use database links from the Linux database to the Windows database which can then access the foxpro database.

Speak to your local Oracle account rep - in instances like this, there are sometimes opportunities to avoid licensing the 'intermediate' node.



Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

ODBC to ODBC

Trisha Abayaratne, March 03, 2017 - 12:09 am UTC

Thanks Connor for your response. Is it possible for ODBC in FoxPro side to communicate with oracle gateway ODBC in Linux? So it'll be an win ODBC(FoxPro) to linux ODBC(gateway) data transfer.
Connor McDonald
March 03, 2017 - 5:38 am UTC

If you have all the necessary bits and pieces, yes. Here's how a typical HS setup might work (without full transparent gateway options).

(In all of this, X, Y etc might all be the *same* node - just depends on what you've got installed where)

You have an ODBC setup on node Y that can talk to Foxpro. We'll call this connection FOX_ACCESS (that would be setup in the standard ODBC-config screens)

You have a database on node X.

So the database on node X needs to be talk to node Y in order to get to Foxpro.

Node X will have a tnsnames.ora entry similar to this:

FOX_REMOTE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST =nodeY)(PORT = 1521))
    (CONNECT_DATA =
      (SID = getfox)
    )
    (HS = OK)
  )


Now nodeY needs to *listen* for those reqests, so it will need an Oracle listener process running with a listener.ora file similar to do:

LISTENER =
 (ADDRESS_LIST=
      (ADDRESS=(PROTOCOL=tcp)(HOST=....)(PORT=1521))
 )

SID_LIST_LISTENER=
  (SID_LIST=
      (SID_DESC=
         (SID_NAME=dg4odbc)
         (ORACLE_HOME=c:\oracle\product\12.1.0.2)
         (PROGRAM=dg4odbc)
      )
  )


So nodeY is "offering out" HS facilities to people who in on port 1521.

When nodeX contacts nodeY as says "I want to talk to 'getfox'", nodeY will look for a file called initgetfox.ora under $ORACLE_HOME/hs/admin. Inside that file will be something like this:

HS_FDS_CONNECT_INFO = FOX_ACCESS
HS_FDS_TRACE_LEVEL = 0