Discussion:
Connect D2007 with dbx to OracleXE (on Vista)
(too old to reply)
Keith Tolbert
2008-02-24 02:47:24 UTC
Permalink
Greetings,

This is my first posting to a Delphi newsgroup.

I first tried to connect to to OracleXE with Delphi 2005, using dbexpress
(on Vista), but failed. So I took an Advanced Delphi training class from
one of the top Delphi training consultants for one reason - to learn how to
connect D2005/dbx/Oracle XE/Vista. We spent several hours during the week
and we concluded that Vista was the reason. Then, when D2007 came out,
advertising it was 'Vista compatible,' I assumed that there would be no
problem. So, I purchased Delphi 2007 RAD Studio.Net. I am now $5,000
poorer and still cannot make the connection. I have seached Tamarack and
MERS and cannot see any answer there.

Has anyone heard of any developer connecting Delphi 2005, 2006, or 2007 to
Oracle XE, using dbexpress (on Vista)?

I am VERY disappointed and would really appreciate ANY help.

Here is the error I am receiving: "Failure to Connect: TNS:could not
reseolve the connect identifier specified."

Thank you so much,

Keith

===========================
Here is my context:
OS: Vista Ultimate
Delphi: 2007 Rad Studio
Database Server: Oracle 10g XE (client install not required for Local
XE)

Here are my revelant file locations:
TNSNAME.ORA: (there are two copies, in these locations)
C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
C:\oraclexe\app\oracle
OCI.DLL: C:\oraclexe\app\oracle\product\10.2.0\server\BIN
SQLNET.ORA: C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
C:\Program Files\CodeGear\RAD Studio\5.0\bin\dbxora30.dll
(I thought Delphi 2007 Rad Studio came with dbx4!?)
dbxdrivers.ini: C:\Users\Public\Documents\RAD Studio\dbExpress
dbxconnections.ini: C:\Users\Public\Documents\RAD Studio\dbExpress

Here is my database info:
Oracle XE is running:
This is verified by running the Oracle XE app and looking at the
data
Database: The sample database ('HR'), which comes with Oracle XE

Here is what I do:
1) Create VCL app
2) Add one form
3) Add TSQLConnection to form
4) Connection Builder: Create a Connection object:
1) Connection Name: ORATest4
1) DriverName: Oracle
2) Database: XE
3) User_Name: hr
4) Password: hr
5) BlobSize: -1
6) ErrorResourceFile:
7) Localecode: 0000
8) Oracle TransIsolation: ReadCommited
9) OS Authentication:False
10) Multiple Transaction: False
11) Trim Char: False
2) Oracle DriverName:
1) Library Name: dbexpora.dll
2) Vendor Name: oci.dll

Here is what I have done to try to fix this:
1) I made a copy of TNSNAMES.ORA and put it in in the '...
app\oracle\' directory
2) I have looked up ORA-12154 on the net and a web site said to add the
following to the SQLNET.ORA file
'NAMES.DIRECTORY_PATH = TNSNAMES'
3) The same site said there could be a syntax error in the TNSNAMES.ORA
file
However, I have not edited the TNSNAMES at all
Plus, the Oracle app, which I assume, also uses the TNSNAMES.ORA
file
to connect to the db, connects just fine
4) I have made sure all of the files above are not read only and there
is Full Access by all users and the system
Thomas Pfister
2008-02-24 22:19:58 UTC
Permalink
Keith,

believe me, it works ....

Where is the XE-instance ? on the same machine or remote
if remote: what type of Oracle-client do you use ? the fat client or the
instant client ?
Have you the following in your SQLNET.ora (on the server-side):

SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAMES.DIRECTORY_PATH=(ezconnect, tnsnames)

Do you connect to the IP-Address or the server-name ??


:-) thomas
Post by Keith Tolbert
Greetings,
This is my first posting to a Delphi newsgroup.
I first tried to connect to to OracleXE with Delphi 2005, using dbexpress
(on Vista), but failed. So I took an Advanced Delphi training class from
one of the top Delphi training consultants for one reason - to learn how
to connect D2005/dbx/Oracle XE/Vista. We spent several hours during the
week and we concluded that Vista was the reason. Then, when D2007 came
out, advertising it was 'Vista compatible,' I assumed that there would be
no problem. So, I purchased Delphi 2007 RAD Studio.Net. I am now $5,000
poorer and still cannot make the connection. I have seached Tamarack and
MERS and cannot see any answer there.
Has anyone heard of any developer connecting Delphi 2005, 2006, or 2007 to
Oracle XE, using dbexpress (on Vista)?
I am VERY disappointed and would really appreciate ANY help.
Here is the error I am receiving: "Failure to Connect: TNS:could not
reseolve the connect identifier specified."
Thank you so much,
Keith
===========================
OS: Vista Ultimate
Delphi: 2007 Rad Studio
Database Server: Oracle 10g XE (client install not required for Local
XE)
TNSNAME.ORA: (there are two copies, in these locations)
C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
C:\oraclexe\app\oracle
OCI.DLL: C:\oraclexe\app\oracle\product\10.2.0\server\BIN
SQLNET.ORA: C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
C:\Program Files\CodeGear\RAD Studio\5.0\bin\dbxora30.dll
(I thought Delphi 2007 Rad Studio came with dbx4!?)
dbxdrivers.ini: C:\Users\Public\Documents\RAD Studio\dbExpress
dbxconnections.ini: C:\Users\Public\Documents\RAD Studio\dbExpress
This is verified by running the Oracle XE app and looking at the
data
Database: The sample database ('HR'), which comes with Oracle XE
1) Create VCL app
2) Add one form
3) Add TSQLConnection to form
1) Connection Name: ORATest4
1) DriverName: Oracle
2) Database: XE
3) User_Name: hr
4) Password: hr
5) BlobSize: -1
7) Localecode: 0000
8) Oracle TransIsolation: ReadCommited
9) OS Authentication:False
10) Multiple Transaction: False
11) Trim Char: False
1) Library Name: dbexpora.dll
2) Vendor Name: oci.dll
1) I made a copy of TNSNAMES.ORA and put it in in the '...
app\oracle\' directory
2) I have looked up ORA-12154 on the net and a web site said to add the
following to the SQLNET.ORA file
'NAMES.DIRECTORY_PATH = TNSNAMES'
3) The same site said there could be a syntax error in the TNSNAMES.ORA
file
However, I have not edited the TNSNAMES at all
Plus, the Oracle app, which I assume, also uses the TNSNAMES.ORA
file
to connect to the db, connects just fine
4) I have made sure all of the files above are not read only and there
is Full Access by all users and the system
Keith Tolbert
2008-02-25 20:52:32 UTC
Permalink
Greetings Thomas,

I am so glad I've finally found someone who can help me.

I'm at work right now. I will try your suggestions when I get back home=

tonight.

I will let you know how it turned out tomorrow.

Here are some of the answers to your questions:

1) XE is on the same machine.

2) The Oracle client is OCI.dll (I listed its location below)

3) This is a fat client app (Delphi Win32/dbexpress/OracleXE/Vista)

4) I believe I am tring to connect through server-name

That is what is in the DBX connection object

Again, thanks for your response.

Keith
Post by Thomas Pfister
Keith,
believe me, it works ....
Where is the XE-instance ? on the same machine or remote
if remote: what type of Oracle-client do you use ? the fat client or the
instant client ?
SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAMES.DIRECTORY_PATH=(ezconnect, tnsnames)
Do you connect to the IP-Address or the server-name ??
:-) thomas
Post by Keith Tolbert
Greetings,
This is my first posting to a Delphi newsgroup.
I first tried to connect to to OracleXE with Delphi 2005, using dbexpress
(on Vista), but failed. So I took an Advanced Delphi training class from
one of the top Delphi training consultants for one reason - to learn how
to connect D2005/dbx/Oracle XE/Vista. We spent several hours during the
week and we concluded that Vista was the reason. Then, when D2007 came
out, advertising it was 'Vista compatible,' I assumed that there would be
no problem. So, I purchased Delphi 2007 RAD Studio.Net. I am now $5,000
poorer and still cannot make the connection. I have seached Tamarack and
MERS and cannot see any answer there.
Has anyone heard of any developer connecting Delphi 2005, 2006, or 2007
to Oracle XE, using dbexpress (on Vista)?
I am VERY disappointed and would really appreciate ANY help.
Here is the error I am receiving: "Failure to Connect: TNS:could not
reseolve the connect identifier specified."
Thank you so much,
Keith
===========================
OS: Vista Ultimate
Delphi: 2007 Rad Studio
Database Server: Oracle 10g XE (client install not required for Local
XE)
TNSNAME.ORA: (there are two copies, in these locations)
C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
C:\oraclexe\app\oracle
OCI.DLL: C:\oraclexe\app\oracle\product\10.2.0\server\BIN
SQLNET.ORA: C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
C:\Program Files\CodeGear\RAD Studio\5.0\bin\dbxora30.dll
(I thought Delphi 2007 Rad Studio came with dbx4!?)
dbxdrivers.ini: C:\Users\Public\Documents\RAD Studio\dbExpress
dbxconnections.ini: C:\Users\Public\Documents\RAD Studio\dbExpress
This is verified by running the Oracle XE app and looking at the
data
Database: The sample database ('HR'), which comes with Oracle XE
1) Create VCL app
2) Add one form
3) Add TSQLConnection to form
1) Connection Name: ORATest4
1) DriverName: Oracle
2) Database: XE
3) User_Name: hr
4) Password: hr
5) BlobSize: -1
7) Localecode: 0000
8) Oracle TransIsolation: ReadCommited
9) OS Authentication:False
10) Multiple Transaction: False
11) Trim Char: False
1) Library Name: dbexpora.dll
2) Vendor Name: oci.dll
1) I made a copy of TNSNAMES.ORA and put it in in the '...
app\oracle\' directory
2) I have looked up ORA-12154 on the net and a web site said to add
the following to the SQLNET.ORA file
'NAMES.DIRECTORY_PATH = TNSNAMES'
3) The same site said there could be a syntax error in the
TNSNAMES.ORA file
However, I have not edited the TNSNAMES at all
Plus, the Oracle app, which I assume, also uses the TNSNAMES.ORA
file
to connect to the db, connects just fine
4) I have made sure all of the files above are not read only and there
is Full Access by all users and the system
Keith Tolbert
2008-02-26 14:17:34 UTC
Permalink
Greetings Thomas,

Ok, here is my work from last night, after work.

1) There are three files on my machine named "SQLNET.ORA"
They are located here:
C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN\SAMPLE
C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
C:\Users\Owner
The one in the Sample directory is not a working SQLNET.ora file; it
contains instructions.
The other two are identical and both have been granted full permissions.

2) Here is what they were before the change
SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAME.DEFAULT_ZONE = world
NAMES.DEFAULT_DOMAIN = world
NAMES.DIRECTORY_PATH = TNSNAMES

3) Here is what they are now, following your instructions.
SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAME.DEFAULT_ZONE = world
NAMES.DEFAULT_DOMAIN = world
NAMES.DIRECTORY_PATH = (ezconnect,tnsnames)

4) Also. here is my drivers:
Driver Name Library Name Vendor Library
Oracle dbxora30.dll oci.dll
Both of these files have been granted full permissions.

5) I am still receiving the same error
By the way, the error is thrown when I hit the Check mark button in
Connection builder

Again Thomas, thank you so much

Keith
Post by Thomas Pfister
Keith,
believe me, it works ....
Where is the XE-instance ? on the same machine or remote
if remote: what type of Oracle-client do you use ? the fat client or the
instant client ?
SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAMES.DIRECTORY_PATH=(ezconnect, tnsnames)
Do you connect to the IP-Address or the server-name ??
:-) thomas
Post by Keith Tolbert
Greetings,
This is my first posting to a Delphi newsgroup.
I first tried to connect to to OracleXE with Delphi 2005, using dbexpress
(on Vista), but failed. So I took an Advanced Delphi training class from
one of the top Delphi training consultants for one reason - to learn how
to connect D2005/dbx/Oracle XE/Vista. We spent several hours during the
week and we concluded that Vista was the reason. Then, when D2007 came
out, advertising it was 'Vista compatible,' I assumed that there would be
no problem. So, I purchased Delphi 2007 RAD Studio.Net. I am now $5,000
poorer and still cannot make the connection. I have seached Tamarack and
MERS and cannot see any answer there.
Has anyone heard of any developer connecting Delphi 2005, 2006, or 2007
to Oracle XE, using dbexpress (on Vista)?
I am VERY disappointed and would really appreciate ANY help.
Here is the error I am receiving: "Failure to Connect: TNS:could not
reseolve the connect identifier specified."
Thank you so much,
Keith
===========================
OS: Vista Ultimate
Delphi: 2007 Rad Studio
Database Server: Oracle 10g XE (client install not required for Local
XE)
TNSNAME.ORA: (there are two copies, in these locations)
C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
C:\oraclexe\app\oracle
OCI.DLL: C:\oraclexe\app\oracle\product\10.2.0\server\BIN
SQLNET.ORA: C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
C:\Program Files\CodeGear\RAD Studio\5.0\bin\dbxora30.dll
(I thought Delphi 2007 Rad Studio came with dbx4!?)
dbxdrivers.ini: C:\Users\Public\Documents\RAD Studio\dbExpress
dbxconnections.ini: C:\Users\Public\Documents\RAD Studio\dbExpress
This is verified by running the Oracle XE app and looking at the
data
Database: The sample database ('HR'), which comes with Oracle XE
1) Create VCL app
2) Add one form
3) Add TSQLConnection to form
1) Connection Name: ORATest4
1) DriverName: Oracle
2) Database: XE
3) User_Name: hr
4) Password: hr
5) BlobSize: -1
7) Localecode: 0000
8) Oracle TransIsolation: ReadCommited
9) OS Authentication:False
10) Multiple Transaction: False
11) Trim Char: False
1) Library Name: dbexpora.dll
2) Vendor Name: oci.dll
1) I made a copy of TNSNAMES.ORA and put it in in the '...
app\oracle\' directory
2) I have looked up ORA-12154 on the net and a web site said to add
the following to the SQLNET.ORA file
'NAMES.DIRECTORY_PATH = TNSNAMES'
3) The same site said there could be a syntax error in the
TNSNAMES.ORA file
However, I have not edited the TNSNAMES at all
Plus, the Oracle app, which I assume, also uses the TNSNAMES.ORA
file
to connect to the db, connects just fine
4) I have made sure all of the files above are not read only and there
is Full Access by all users and the system
Loading...