I use Net8 Easy Config to manage the entries in my TNSNAMES.ORA. For my DB, the TNSNAMES entry looks like:
REG6.WORLD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 255.255.255.0)(PORT = 1521))
(CONNECT_DATA =
(SID = ORCL)
)
)
Of course, you need to use your server's real IP address for the HOST.
Then, in the ODBC Administrator, I create a new User DSN. The DSN [which is used connection in the VFP DBC] and Description do not matter. What you put for the SERVER does matter. In this example it would be REG6 and not REG6.WORLD.
When you create your connection in a VFP DBC, you select the ODBC DSN you entered for the DSN in the ODBC Administrator.
For a DSN-less connection, in this example:
lnHandle = SQLStringConnect('Driver=Microsoft ODBC for Oracle;UID=myuserid;PWD=mypassword;CONNECTSTRING=reg6;')
I also have an ODBC class in the Files section here under the API category that is heavily commented. There are procedures in it to programmatically create and remove DSNs, check the registry to see if the correct drivers are installed, etc.
Mark McCasland
Midlothian, TX USA