I solved this a while ago, so this solution may or may not help, but I think these are the steps I took...
I have Oracle Client 10.2.0 installed on my PC and this is where I am getting the oci.lib to link against.
Oracle Client also has a "tnsping" executable that helps find all the databases that you have defined in your "tnsnames.ora" file in your Oracle Client directory. If you run a command at the prompt like, "tnsping myDatabase" and it does not return with the last line saying "OK", then you cannot connect to your database.
My understanding is that Oracle does all its database lookups by name, so you have to define what that name should evaluate to in the tnsname.ora file. You can either create this in a text editor of your choice, or if you have the application that comes with Oracle Client, "Net Manager" or Net Configuration Assistant (or some other similar name) you can define your name lookup through their assistant tools which will generate the tnsnames.ora file for you.
My file looks similar to this:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
|
# tnsnames.ora Network Configuration File: C:oracleproduct10.2.0client_1tnsnames.ora
# Generated by Oracle configuration tools.
MyDatabase =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = MyDatabasePcHostName)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = MyDatabase)
)
)
|
I also had to define the following Environment Variables and set them equal to my Oracle installation directory, but as I did them all at once, I'm not sure if they are all required:
ORACLE_HOME
SQLPATH
TNS_ADMIN
Hope this helps!