ADO Connection not working if Delphi and Oracle not on same computer

I had Delphi working fine with Oracle using ADO when Oracle 11g is on the same pc as Delphi. I tried to use Delphi from another pc and I do not know what to enter for "Servername" on the Build connection string screen. Originally I had tough I needed to enter the computer name, aka Hostname. I also tried entering a name of the oracle instance or Oracle service, and also tried using this info in for format of hostname.service and \\hostname-service.

Can someone help -is it just the computer name, is it the ip address, does it need the Oracle instance name?

Thanks.

steve
0
steve
6/17/2012 1:09:01 PM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

6 Replies
2932 Views

Similar Articles

[PageSpeed] 53

Hello Steve

This is Oracle connection descriptor, which may be one
of the following forms. Although I am not sure, that ADO
supports all of them:

- TNS alias, eg XE

- TNS connection descriptor, eg 
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

- Oracle simple connection string, eg 127.0.0.1:1521/XE

I dont know what Oracle version is installed and
how it is configured, but at least you can try to 
search in Google using above key words.

-- 
With best regards,
Dmitry Arefiev / www.da-soft.com
AnyDAC - Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL,
DB2, SQL Anywhere, Access, Informix, ODBC high-speed data access lib
0
Dmitry
6/17/2012 7:13:47 PM
> - Oracle simple connection string, eg 127.0.0.1:1521/XE

Sorry, Oracle easy connection string:
http://www.orafaq.com/wiki/EZCONNECT

PS: Not simple <g>

-- 
With best regards,
Dmitry Arefiev / www.da-soft.com
AnyDAC - Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL,
DB2, SQL Anywhere, Access, Informix, ODBC high-speed data access lib
0
Dmitry
6/17/2012 7:16:30 PM
Thanks for your responses but unfortunately nothing has worked.
I keep getting "test connection failed...ORA-06413: connection not open

I think that using 127.0.0.1 means it is on the same machine so I tried the hostname:1521/XE as well as /ORCL but no success.

I wonder if it has anything to do with mixed versions of Win 7 - Oracle is on Professional  and Delphi is calling from a Win Home Premium machine. The only thing I can think to do now is reinstall Oracle client on the Home Premium machine. It turns out that Oracle 10G is on the same machine but I cannot connect to it either.

Best regards,
Steve



> {quote:title=Dmitry Arefiev wrote:}{quote}
> > - Oracle simple connection string, eg 127.0.0.1:1521/XE
> 
> Sorry, Oracle easy connection string:
> http://www.orafaq.com/wiki/EZCONNECT
> 
> PS: Not simple <g>
> 
> -- 
> With best regards,
> Dmitry Arefiev / www.da-soft.com
> AnyDAC - Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL,
> DB2, SQL Anywhere, Access, Informix, ODBC high-speed data access lib
0
steve
6/17/2012 7:56:46 PM
Ok. I will try to do the following before reinstalling the Oracle:
- verify that client PC can ping server PC
- verify that Oracle server and listener are running on server PC
- verify that you can telnet to port 1521 on server PC from client PC
- verify that Oracle client is installed on client PC
- try to connect from client PC to server PC using SQL*Plus / 
TOAD / what else using easy connect
- configure Oracle Home\network\admin\tnsnames.ora, add 
MyOra TNS alias
- try to connect using tnsping or sql*plus from client PC to 
server PC using using TNS alias
- try to connect with ADO using easy connection string and 
using TNS alias

-- 
With best regards,
Dmitry Arefiev / www.da-soft.com
AnyDAC - Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL,
DB2, SQL Anywhere, Access, Informix, ODBC high-speed data access lib
0
Dmitry
6/18/2012 4:42:25 AM
> {quote:title=Dmitry Arefiev wrote:}{quote}
> Ok. I will try to do the following before reinstalling the Oracle:
> - verify that client PC can ping server PC
> - verify that Oracle server and listener are running on server PC
> - verify that you can telnet to port 1521 on server PC from client PC
> - verify that Oracle client is installed on client PC
> - try to connect from client PC to server PC using SQL*Plus / 
> TOAD / what else using easy connect
> - configure Oracle Home\network\admin\tnsnames.ora, add 
> MyOra TNS alias
> - try to connect using tnsping or sql*plus from client PC to 
> server PC using using TNS alias
> - try to connect with ADO using easy connection string and 
> using TNS alias
> 
> -- 
> With best regards,
> Dmitry Arefiev / www.da-soft.com
> AnyDAC - Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL,
> DB2, SQL Anywhere, Access, Informix, ODBC high-speed data access lib


I comletely uninstalled Oracle 10g which is on the client machine with Delphi, then I downloaded and installed Oracle 11g. Delphi can read this Oracle, so now I have Delphi on 2 pcs and Oracle 11g on the same 2 machines. I assume that installing Oracle 11g automatically installed Oracle client.

I still cannot get the ADO connection test to work trying to point it at a different machine than the one I am running on.
I did ping from the client to to server pc.

I ran telenet but it just ended with no message. I need to look further into running it - it seems to run in a DOS window but I did not give it any command line parameters .

When you say try to connect using SQL plud, I do not know how to point it to another pc. Or did you mean I should map a network drive from the client to the server pc, then run sqlplud from the client machine, but running it on the mapped drive which is on the server?

Suppose I get completely rid of Oracle and instead use Interbase. Then I would not need ADO, but how do it to the server machine?  Is it just hostname, or should it include the name of the service that is running?

THank for your input.
0
steve
6/19/2012 8:45:20 PM
> I assume that installing Oracle 11g automatically
> installed Oracle client.    

Yes, it installs OCI. Although Oracle OLEDB provider
probably must be explicitly specified in installer or even
installed separately. Cannot say for sure, as I never was
installing Oracle OLEDB provider.
 
> I still cannot get the ADO connection test to work trying to point it
> at a different machine than the one I am running on. 

You should start listener on the "server" machine. It is
a service with the name like "OracleXETNSListener".
Then on "client" machine you should configure Oracle
network component. For that go to <oracle\network\admin,
find there tnsnames.ora, and add there something like that:

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = DA)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

Replace host , service_name with values appropriate
for you. Probably service_name leave with XE.
Then try to connect and use XE as the database /
data source name.

-- 
With best regards,
Dmitry Arefiev / www.da-soft.com
AnyDAC - Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL,
DB2, SQL Anywhere, Access, Informix, ODBC high-speed data access lib
0
Dmitry
6/20/2012 12:28:07 PM
Reply:

Similar Artilces:

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

Delphi 6 to Delphi 2010 upgrade and ADO
We have an application written in Delphi 6 Professional that uses ADO to access databases servers that may be on other PCs in our network. We want to move to Delphi 2010 but can't decide if we need Professional or Enterprise. 2010 Pro has dbGO - will this give us the same functionality as the ADO components we use in Delphi 6 Pro? Thanks, Keith > 2010 Pro has dbGO - will this give us the same functionality as the > ADO components we use in Delphi 6 Pro? Yes. > {quote:title=Joachim Uersfeld wrote:}{quote} > > 2010 Pro has dbGO - will this give us the same func...

ASA8 and Delphi ADO? Is it work?
Anybody test this configuration? As i can remember ASA7 don't work with Delphi via ADO. ---------------------------------- Oleg Kovalevsky Moscow, Russia I haven't tested ASA8 with Delphi, but I'm using ASA7 with Delphi 5 and ADOExpress. There are some glitches, but ASA support has been very helpful with addressing the problems. On Fri, 29 Mar 2002 17:01:05 +0300, "Oleg Kovalevsky" <okovalevsky@hotmail.com> wrote: >Anybody test this configuration? As i can remember ASA7 don't work with >Delphi via ADO. > > >----------...

ASA7 ADO & Delphi ADO ?? Anyone is using it?
Any comments? Is it working? Any Problems? Thanks Hi, PR <noemail@no.com> schrieb in im Newsbeitrag: BoTThJaq$GA.89@forums.sybase.com... > Any comments? Is it working? Any Problems? I tried to connect to ASA7 via the new OLE DB - Provider and ADOExpress from Delphi 5.01. No chance. Only the error message 'Invalid Enum Value'. About the new provider I haven't heard anything good until now... Regards Frank Frank, I've experienced the same problem with the ASA 7 OLEDB Provider. I'm not sure if this is a bug in the AsaProvider or Delp...

Help with ADO connectivity in Delphi XE
The company I work for has finally started migrating applications from Delphi 5 and 7 to Delphi XE and XE2. But, I am having a problem with a TADOConnection. A simple application built in D5 to connect to a MS SQL database works. But the same code compiled in Delphi XE will not connect. When the user's role changes from User to Power User, they can connect to the database in the app compiled in XE. The workstation that the user is running from is Windows XP. The SQL Server version is 2005. MDAC version 2.8 Unfortunately, we have been unable to simulate their environment, an...

Connection String for ADO Database in delphi prism
Hi, I want to connect to a database with ADO and aspx. from VB code what is the equivalent in delphi prism ? .... Dim MyReader as sqldatareader Dim MyConnection as sqlconnection = new sqlconnection() myConnection.connectionstring = configurationmanager.connectionstrings("DSN_MYDB").connectionstring Dim mycommand as sqlcommand = new sqlcommand() mycommand.commandtext="select * from mytable" mycommand.commandtype = commandtype.text mycommand.connection = myconnection mycommand.connection.open() Myreader=mycommand.executereader(commandbehavior.closeconnec...

A problem about connecting ASA by ADO component of Delphi?
Is there anyone to try to use ADO component of Delphi to connect ASA? I fail to do it. I manipulate database by TDataSource,TADOQuery,TConnection components of Delphi, and set up connection with ASA guide. When running the program, the connection is set up successfully. But a EoleException is thrown once I make a query using TADOQuery. System prompt "unknown error". Who knows what happened? Is it a compatible problem between ASA driver(ASAProv) and ADO component of Delphi? (All are ok when connecting ASA by BDE components). Is there anyone to try this?? ...

Connecting to MS-SQL-Express with ADO and Delphi 6
Hi, I have installed MS-SQL Express and created a database - Test1 - and a table within that database called Equipment with a few columns. I have created a new delphi 6 application with a TADOConnection component. When creating the connection string I have chosen the "Microsoft OLE DB Provider for SQL Server", then entered the server name as "mtpcname\SQLExpress1" and selected Windows NT Integrated security. Clicking the Test Connection button says that the connection was successful. However the drop down list to select the database on the server only list ...

Oracle NCLOB data getting truncated when using delphi ADO
I am using Delphi2007 and using ADO for data access. When trying to select nclob data from an Oracle database it generally works, but I have one query that is consitantly truncating the data at 12 characters. I have already been in touch with Oracle and they have confirmed that the OLEDB provider that is being used is correctly returning the data. Here is the query select ACT_KEY, COALESCE((SELECT LTX_TEXT FROM TEXT_TABLE WHERE LTX_TABLE='SOURCE_TABLE' AND LTX_TEXT_ID = 'ACT_DESC' AND LTX_TABLE_KEY = CAST(SOURCE_TABLE.ACT_KEY AS NVARCHAR2(10))),TO_NCLOB(ACT_DESC)) as A...

ADO Connection with VB6 works, XE2 does not work
I am facing a strange problem in a concrete Windows 7 64 bits Home Premium SP2 machine, with other machines in the same local network all is working ok. My tests are the following: 1.) I create an *.UDL file. I click in "Test connection" and it works, I am using the generated string to test the connection in the programs: Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Password=mypassword;Data Source=SERVIDOR\HOMEDES; 2.) Using an old VB6 program to connect to the SQL Server it works. 3.) Using a test program using XE2 it does not work, it fails in the lin...

"Assertion Failed" with ADO connection, Windows 7, Delphi 2007
I have Delphi 2007 for Win 32 installed on both the XP and Win7 OS of my dual boot machine. In Win 7, when I use an ADO connection on a simple Access database, it runs fine, until I reset the program. When I click the Program Reset, I get an error "Assertion Failed". If I click this several times, it goes away, and the program resets. Note: I can build exactly the same program in XP with no problems. What does this error mean? What should i do about it? Thanks Ken Moore Ken Moore wrote: > I have Delphi 2007 for Win 32 installed on both the XP and Win7 OS of > my...

ADO Connection Does Not Work W/ Same Parameters As DSN Connection
Folks, Could you please help me with the following code? When the program gets to the line that says: .Open userid:="myID", Password:="myPassword" I get an error message saying "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". What I can't figure out is I'm not using a data source name and what do I need a default driver for? I've already specified the driver and it's right where I said it was. I'm running on an NT 4.0 (SP4) platform using VB6 (SP5). My references are * Micro...

ADO Connection Does Not Work W/ Same Parameters As DSN Connection
Folks, Could you please help me with the following code? When the program gets to the line that says: .Open userid:="myID", Password:="myPassword" I get an error message saying "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". What I can't figure out is I'm not using a data source name and what do I need a default driver for? I've already specified the driver and it's right where I said it was -- i.e., c:\dbodbc8.dll. I'm running on an NT 4.0 (SP4) platform using VB6 (SP5). My...

Delphi 5 with ADO
Hi I'm having some problems adjusting a Delphi5/MSSQL database application, which i did not wrote (what's more: i'm not a Delphi expert either) so i thought maybe someone in this comunity will enlighten me. It' about an SQL command which is issued by this delphi5 application (the sql command was traced in SQL server with profiler), but which is nowhere to be found in the souce code. I've searched already all the components which i knew that could issue the SQL command (TADOQuery, TADOCommand) but with no l uck. Could anyone tell me other misterious places where i shou...

Web resources about - ADO Connection not working if Delphi and Oracle not on same computer - embarcadero.delphi.ado

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Sydney's beauty relies on its visual and physical connection to nature
Landowners, custodians and developers must collaborate to create a healthy environment, happy residents and a more productive city.

Governor declares state of emergency in connection with California methane leak
... of Emergency Services) On Wednesday evening, California Governor Jerry Brown declared a state of emergency in Los Angeles County in connection ...

Miss Golden Globe role 
requires showbiz connections
One constant about the Golden Globes (tonight at 8 on WHDH, Ch.

Tons Of Methane Are Spewing Out Of California, And There’s A Connection To The Governor
The out of control leak has forced thousands of residents to flee their homes. Gov. Brown's sister is a paid board member at the company that ...

10th person arrested in connection with Paris attacks
CNN 10th person arrested in connection with Paris attacks CNN (CNN) Belgian police have arrested a 10th person in connection with last month's ...

Should auld connections be forgot...
This environmental testing company has strict data-retention requirements and they go beyond the data, reports a pilot fish on the scene. "Per ...

Resources last updated: 1/12/2016 2:23:51 AM