Solved

ORACLE DB

Posted on 2002-05-03
14
2,000 Views
Last Modified: 2013-11-23
Hello!

I just installed ORACLE server 9i on a machine and ORACLE client 9i on another (which is quite an event by itself!).  

I'd like to know what I have to do to configure the BDE to work with it.  When I try to connect to it I get an error about drivers or something.  I work with Delphi 4.

Also, I'd like to know how to do it with Delphi 6's ADO component.  I also get the error when configuring the connection string.

Thanks!
0
Comment
Question by:qas
  • 5
  • 3
  • 2
  • +4
14 Comments
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6989521
Hello

from one of my old Paqs, here's the 3 ways to connect to oracle database, I havn't tested that with oracle 9i yet, but working fine with oracle 8 and 8i

but first, could u view the tables on the server using the Sql plus in the client machine?
===
 here's 3 ways to connecting to Oracle


to use the ado, you should have D5 enterprise edition, or if you have D5 Pro, you can buy ADOExpress

from borland store

1) Native Connection:

Go to the BDE Administrator, you need to make new alias here
from Object menu > New > Database driver name > Oracle
now you have new alisa called oracle1, or any thing you chose
you need to change some of oracle1 properties:
Server Name : OraServer (it's will be oracle service name in your machine)
Just insure net protocol is : TNS
choose apply for the alias
now you have new alias connected to oracle, and you can access to it via
the table and query component like you connect to paradox or access

2) ADO

 this require you have delphi 5 enterprise edition, or delphi 5 pro with
ado express

from delphi in component palette switch to ADO

drop in the form ADOTable component
from object inspector we need to modifiy some properties of ADOTable

ConnectionString : double click on it
you will see new window, choose : use connection string then press Build
button
you will see datalink window now from provier tab choose > microsoft OLE DB
provider for oracle  then press next button
now in connection tab enter the following

Enter a server name : OraServer (oracle service name in your machine not the
alias name you created befor)
and enter the user name and password
click to check allow saving password check box
then click on Test connection, if it give you message "Test connection
Succeeded" that's mean you are connect now to oralce
then press ok button to close the this window and ok agian to close ado
connection window

again back to object inspector and now choose table name

3) ODBC
go to contorl panel, and than choose 32bit ODBC

in the user DNS tab choose Add, then choose Microsoft ODBC driver for oracle, then click finish
you will see now micosoft odbc driver for oracle setup dialog
in the dialog enter your informations
data source name : choose name to define the odbc for your application ( you will it as alias in BDE


admin.)
description : any thing
user name: any user is exist in the oracle database(Scott for testing)
connection string: choose your oracle server name

I hope that working with you, but anyway, I think if you use delphi native connection or ado to connect


to oracle
database, both of them better and faster than odbc


if you have Delphi 6 enterprise edition, you could use the DBExpress also

to check the tables in the oracle database use this select statment
"select * from tab"

if you have any errors, plz post them


Best regards
Mohammed Nasman
0
 

Author Comment

by:qas
ID: 6989972
Hey mnasman!

Thanks for the answer.

I still get an eror message though.  With BDE connection, the message says (it is translated from french so maybe it is not accurate):

Cannot load an IDAPI service library
File: SQLORA8.dll
Alias: ORACLE1

With ADO, the problem is similar, with different a message.  That message though is raised when I test the connection.

Delphi is installed on the client computer with running Oracle 9i client software.  I can get a connection with sqlplus without any problem.

Any hint ?

0
 
LVL 6

Expert Comment

by:zebada
ID: 6990132
listening...
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6990256
Hi qas,

be sure that Oracle drivers has right configuration. Try to run BDE admin and follow to: configurtaion.drivers.native.oracle
be sure that
DLL32 and VENDOR INIT has right settings.

check out this link:
http://www.borland.com/devsupport/sqllinks/pub-12.htm

------
Igor
0
 

Author Comment

by:qas
ID: 6991155
Hello folks!

I've tried all u said guys.  But I don't think the problem is a BDE one.  When I try to test an ADO connection, windows tells me that I need Oracle drivers (7.3 and upper) to get it to work (also translated from french so I'm sorry if it's not accurate).

I think it's more of an Oracle installation problem.  Is there a specific way I have to install the client so that the correct DLLs get at the right place ?

Thanks again!
0
 

Author Comment

by:qas
ID: 6991341
Hey experts!

More news:

I just de-install and re-install Oracle client 9i and I now have a new option in the ADO Provider form: ORACLE PROVIDER FOR OLE DB.

When I try to use it, I get a message saying: OraOLEDBpus.dll: Can't find library (still translated from french)

Any clue ??
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6992991
I suppose that you have to replace interface dll shipped with BDE to interface dll shipped with Oracle. This one depend from Oracle version as mentioned in link  I provided.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6993107
Hello

  Try to install the Lastest MDAC, you can get it from microsoft site, www.microsoft.com/data

 also there's OLE DB proivder for native connection to Oracle database, you get it from Oracle site

  I read in the newsgroups that the BDE not working with Oracle 9i

  but the 3th party tools like ODAC and DOA working with oracle 9i

0
 

Author Comment

by:qas
ID: 6994716
Thanks for the comments!

How do I replace those DLLs ?  I mean, which DLLs do I have to replace and how do I tell Windows they have been replaced ?

I've installed MDAC 2.7 without changes.

Thanks again.
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6995653
I talk about BDE.

run BDE admin and take a look at Orcale driver settings.

there should be

DLL32: some.DLL  
Vendor Init:  somevendor.DLL

set it according your Oracle version.

------
Igor.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6995721
is the oracle-client installed (comes with oracle)?
0
 

Author Comment

by:qas
ID: 6996533
Hi.
Oracle client IS installed.

BDE gives me two choices for DLL32:

SQLORA8.DLL
SQLORA32.DLL

When I select SQLORA8.DLL, I can select this file as vendor: OCI.DLL

When I select SQLORA32.DLL, I can select one of those two vendors: MTXOCI.DLL and ORA73.DLL

I've tried all the possible combination without success.  

I think mnasman's right about BDE not working with Oracle9i so here is a rewritten version of my question:  what are, from scratch, the steps for me to take so I can get Delphi6 to communicate via ADO connection with a distant Oracle 9i database ?

When I mean scratch, I mean that Delphi is installed and nothing more.

I work with win98se.

Thanks alot!
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9005015
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

PAQ/No Refund

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0
 

Accepted Solution

by:
YensidMod earned 0 total points
ID: 9096649
Question is PAQ'd and no points refunded.

YensidMod
Community Support Moderator @Experts Exchange
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now