Page 1 of 1
Sample Connection String for oraSession
Posted: Mon 06 May 2013 21:54
by syscwl
I'm running Embarc CBuilder 2010...dropped an oracle seesion on form and need a connectioin string -- can some one provide me with a sample of what it should look like...or point me to a sample??Thanks.
Re: Sample Connection String for oraSession
Posted: Tue 07 May 2013 09:32
by WZehntner
May be this helps you (code snippet from Delphi):
OraSession1.Options.Direct := true; // true=direkt Mode;
OraSession1.Options.ConnectionTimeout := 60000; // 60 seconds
OraSession1.LoginPrompt := false;
OraSession1.Username := 'TEST';
OraSession1.Password := 'test';
OraSession1.Server := '194.76.125.47:1521:NEW'; // adjust your IP
try // e2
OraSession1.Ping; // in case of failure raises an exception
// or immediately do the connect:
// OraSession1.Connect;
except // e2
on E: exception do
begin
memo1.lines.add (' Ping-OraSession Exception '+E.Message );
exit;
end;
end; //e2
end;
Re: Sample Connection String for oraSession
Posted: Tue 07 May 2013 10:26
by syscwl
So, there is no connection string when one chooses directconnect????
Re: Sample Connection String for oraSession
Posted: Tue 07 May 2013 12:17
by WZehntner
In my example the connectstring is something like:
Login Prompt=False;Data Source=194.76.125.47:1521:NEW;User ID=TEST; Password=test;Schema=NEW;Connection Timeout=60000;Direct=True
Re: Sample Connection String for oraSession
Posted: Tue 07 May 2013 14:51
by AlexP
Hello,
The ConnectionString property can be set in several ways:
1) SQLPlus analogue
Code: Select all
OraSession.ConnectString := 'username/password@server'; OCI mode
OraSession.ConnectString := 'username/password@host:port:sid'; Direct mode
2) ADO analogue
Code: Select all
OraSession.ConnectString := 'Data Source=server;User ID='username;Password=password'; OCI mode
OraSession.ConnectString := 'Data Source=host:port:sid;User ID='username;Password=password;Direct=true'; Direct mode