PDA

View Full Version : Common pro*c code for both Oracle and non-Oracle environments


Golan
04-05-2005, 10:37 PM
Hi,
I have a PRO*C code that may run also on PCs where Oracle is not
installed. In this case ofcourse the code that read & write from the
database should be ignored.
What should I specify in the code so the oricedures with the database
access will be ignored in case Oracle is not installed?

Thanks

Mark C. Stock
04-06-2005, 04:13 AM
"Golan" <bcg008@mot.com> wrote in message
news:35e0ae97.0504052237.184b53ec@posting.google.com... Hi, I have a PRO*C code that may run also on PCs where Oracle is not installed. In this case ofcourse the code that read & write from the database should be ignored. What should I specify in the code so the oricedures with the database access will be ignored in case Oracle is not installed? Thanks

your initial attempt to connect to the database will fail -- just record
that fact in the variable of your choice, and check that variable in your
code before attempting any database access

++ mcs

Rauf Sarwar
04-06-2005, 09:35 AM
Mark C. Stock wrote: "Golan" <bcg008@mot.com> wrote in message news:35e0ae97.0504052237.184b53ec@posting.google.com... Hi, I have a PRO*C code that may run also on PCs where Oracle is not installed. In this case ofcourse the code that read & write from
the database should be ignored. What should I specify in the code so the oricedures with the
database access will be ignored in case Oracle is not installed? Thanks your initial attempt to connect to the database will fail -- just
record that fact in the variable of your choice, and check that variable in
your code before attempting any database access ++ mcs

Doesn't Pro*C require Oracle client to be installed for remote
connections (atleast middleware SQL*Net/Net8/Net9 etc at minimum)?. If
so, then how could he launch the process without required Oracle client
dll's installed before even attempting a connection?

Regards
/Rauf

Golan
04-06-2005, 08:45 PM
Well the pro*c does required an Oracle clinet installation, but we
intend to compile the code on a client which has this installation,
but to run it not necessarily on the same client.
Regarding checking DB connection, I'll adapt this idea.

Thanks

Ed prochak
04-12-2005, 08:31 AM
I'm just curious, but what sort of business requirements cause you to
build code you will not use?

Ed


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service