Solved

ORACLE DB

Posted on 2002-05-03
14
1,998 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:mnasman
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 22

Expert Comment

by:mnasman
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

14 Experts available now in Live!

Get 1:1 Help Now