Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to connect Oracle with Delphi BDE?

1,635 views
Skip to first unread message

Markus Schmidt

unread,
Feb 1, 2003, 4:42:41 PM2/1/03
to
In Oracle I have the database glob and the
user test for the database glob.

Now I try to connect via BDE-Administration.
Under Configuration I find under Driver/ODBC:
Oracle in OraHome90.That should be the
driver from my Oracle installation.
Then I choose this driver to create a
database alias under databases.
Then I renamed the database alias to test.

In my tnsnames.ora from Oracle this is
been written:

test =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = KT)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = glob.dbs)
)
)

In the BDE under Configuration/Driver/ODBC/
Oracle in OraHome90 in the right definition window
I set DATABASE NAME to test and
USER NAME to test.
Also in the BDE under Databases/test I set
DATABASE NAME to test and
USER NAME to test.
Then I clicked on the plus mark left from test
to login. This window appears:
Database-Login
Database: test
User Name: test
Password:
When I write the password and click on Ok
I get this error message:
"Invalid configuration parameter Alias: test"
Can someone say me what's wrong?

Markus Schmidt


Billy Verreynne

unread,
Feb 3, 2003, 3:19:55 AM2/3/03
to
Markus Schmidt wrote:

> In Oracle I have the database glob and the
> user test for the database glob.

<snipped>

This should have been posted in a Delphi newsgroup instead. It has very
little to do with Oracle.

First make sure that your Oracle client software is working. TNSPING,
SQL*Plus and so on. This eliminates any possible Oracle client issues, like
an incorrect TNSNAMES.ORA, from the equation.

In Delphi, do *not* use the BDE Manager to create Oracle aliases. That is
IMO stupid and makes deployment of Delphi apps for Oracle many times more
complex.

The simplest, easiest and most flexible way is to put a TDatabase object on
your form. Set the (BDE) driver name to ORACLE. This tells the object which
BDE driver to use. Note that the ALIASNAME must be blank - you do not need
it.

Assign a NAME to the object. Click on the PARAMS property of the the object
and enter the following:
SERVER NAME=<tns alias name>
USERNAME=<oracle user name>
PASSWORD=<oracle user's password?

E.g.
SERVER NAME=mydatabase
USERNAME=scott
PASSWORD=tiger

The parameter assignment can also be done dynamically via the method ADD of
the PARAMS property,
E.g.
begin
MyDatabase.Params.Clear;
MyDatabase.Params.Add( 'Server Name=prod.world' );
MyDatabase.Params.Add( 'UserName=scott' );
MyDatabase.Params.Add( 'Password=tiger' );
MyDatabase.Connected := true;
end;

It is very simply to create your own dialog class to popup a dialog box that
prompts the user for the Oracle TNS names, username and password. You then
take the results of the dialog entry and put it into the PARAMS property
using the ADD method as above.

No BDE Manager hacking. No need to create aliases. No need to distribute BDE
config files. No need to merge distributed BDE config files with an
existing BDE config.

--
Billy

Markus Schmidt

unread,
Feb 3, 2003, 4:30:56 PM2/3/03
to
Sorry for wrong group and thank you for your detailed answer.
I used wrong driver dll's.That was the main problem.
But it's good to know how to use the Params property.

Markus Schmidt


dani

unread,
Feb 4, 2003, 8:37:26 AM2/4/03
to
it's valid the same for C++ Builder??

thanks

dani

"Billy Verreynne" <vsl...@onwe.co.za> escribió en el mensaje
news:b1l1n3$o0f$1...@ctb-nnrp2.saix.net...

Billy Verreynne

unread,
Feb 10, 2003, 1:39:30 AM2/10/03
to
"dani" <drezustam#QUITAESTO#@airtel.net> wrote
>...

> it's valid the same for C++ Builder??

I would think so... it implements the same classes as Delphi doesn't it?

--
Billy

dani

unread,
Feb 10, 2003, 2:06:20 AM2/10/03
to
yes, i tried it, but didn't work

dani


"Billy Verreynne" <vsl...@onwe.co.za> escribió en el mensaje

news:1a75df45.03020...@posting.google.com...

Billy Verreynne

unread,
Feb 10, 2003, 7:43:02 AM2/10/03
to
dani wrote:

> yes, i tried it, but didn't work

Please mail me the error details and sample code direct and I will have a
look at it.

This is not really the forum to discuss Borland's OO classes implementation.
:-)

--
Billy

dani

unread,
Feb 11, 2003, 1:57:43 AM2/11/03
to
the problem is that i don't have any native driver to Oracle, only paradox,
access and dbase. so i have to use the oracle odbc driver.
i will look to update my BDE to install a oracle native driver.


thanks

dani


"Billy Verreynne" <vsl...@onwe.co.za> escribió en el mensaje

news:b27voq$6ok$2...@ctb-nnrp2.saix.net...

0 new messages