'perldoc DBI'
--
Mac :})
** I may forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Walter Joyce" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
The main difference between running from the command line and from cron is
that your .profile doesn't get sourced when you run from cron.
Adding $DBI::errstr to your error message would make the message from
Fatal() more meaningful.
--
Mac :})
** I may forward private database questions to the
The announcement Tim sent out on 25 Jan when the lists moved to perl.org
included the addresses for subscribing and unsubscribing.
--
Mac :})
** I may forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat
If you are writing new code, you'd be better off using the DBI method calls
instead of the Oraperl ones. Under Perl 5, Oraperl is just an emulation
layer over DBI and DBD::Oracle. The people here, including me, are more
likely to be able to help with DBI calls.
I'm not sure I understand what is
DBI manages the DBD modules and provides services to them. Any time you
re-build DBI, you should re-build the DBD modules. The same goes for any
compiled module when you re-build Perl.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and
If you are considering working in different RDBMS at different times, you
would probably be better off making the SELECT and INSERT/UPDATE separate
SQL statements. Other databases may have similar features, but they are
likely to have significantly different syntax.
--
Mac :})
** I normally
This is one of those things that's easier to handle procedurally. Add an
ORDER BY clause for fault_no (ascending) and response_no (descending), then
use just the first row you fetch for each fault_no.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a
Is surname a CHAR field?
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Pete Coales" [EMAIL PROTECTED]
To: "DBI
PREFIX=dir is a 'KEY=VALUE' pair, not an option. Case is significant and no
'-'s are allowed.
Run 'perldoc ExtUtils::MakeMaker' and read the "PREFIX and LIB attributes"
and "PREFIX" sections for more information.
--
Mac :})
** I normally forward private database questions to the DBI mail lists.
"Pete Coales" [EMAIL PROTECTED]
To: "Michael A. Chase" [EMAIL PROTECTED]
Cc: "DBI Mailing List" [EMAIL PROTECTED]
Sent: Friday, February 16, 2001 4:38 AM
Subject: RE: problems with bind params
No... its a varchar2(30).
but it does also happen on a char field
and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Pete Coales" [EMAIL PROTECTED]
To: "Michael A. Chase" [EMAIL PROTECTED]
Cc: "DBI Mailing List" [EMAIL PROTECTED]
Sent: Friday, February 16, 2001
I guess four times is a charm. ;}b Tim is very busy, so he'd have forward
it here anyway.
What error message are you seeing?
The glob (*.xst) may be failing because you don't have csh or tcsh
installed. The annoying dependency of perl's glob() on csh is finally
removed in Perl 5.6, but if
for an age.
- Original Message -
From: "Sean Cooper" [EMAIL PROTECTED]
To: "Michael A. Chase" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, February 16, 2001 12:29 PM
Subject: Re: I apologize for this... but what have I done ???
Thank you Tim Michael !
The current post_initialize() uses the external command 'find' to search the
perl library tree for old versions of DBI and DBD drivers. This won't work
on most Win32 machines and probably won't work in some other platforms
either.
It also uses *.xst to identify some of the files used to build
Try adding
$dbh = undef;
after the disconnect() and see if that helps. At least the handle will be
released before global destruction.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring
Most of the methods you need are provided by DBI. You probably won't need
the Oracle specific stuff initially. At least read the full DBI document
once, it will save you a lot of trouble later.
If you are using ActiveState Perl, find the documentation via the Start
Menu. There are links on
This happens even if you disconnect before assigning undef to the handle?
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
If you can, try to find out what the client thinks they are gaining by using
CHAR instead of VARCHAR2. They probably aren't getting the advantage they
think they are and are just setting themselves up for more problems like
this.
--
Mac :})
** I normally forward private database questions to the
There is a TRIM() function, but you don't normally want to use it on a
column in the WHERE clause. Any function around the column name in a
comparison prevents Oracle from using any indexes that may exist on that
column to resolve the comparison.
If you are sending a literal ('1001') to Oracle,
normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "John Kolvereid" [EMAIL PROTECTED]
To: "Michael A. Chase" [EMAIL PROTE
You're not reading the fine manual that came with your ActiveState Perl.
Particularly the parts on PPM.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "John Kolvereid" [EMAIL PROTECTED]
To: "Michael A. Chase" [EMAIL PROTECTED]
Sent: Friday, March 02, 2001 1:31 PM
Subject: Re: (Fwd) unable to DBI-Oracle
The value of an assignment operation is the value assigned; in this case the
result from DBI-connect(). The 'or' version is generally preferred in this
sort of situation to be sure all operations to the left have been performed
before the 'or'.
--
Mac :})
** I normally forward private database
When I generate SQL automatically from the datadictionary, I normally use an
array to hold the column values:
# $dbh - {RaiseError} = 1;
$sth - execute;
my @sTitle = @{$sth - {'NAME'}};
my @sCol = ();
$sth - bind_columns( \( @sCol[0 .. $#sTitle] ) );
while ( $sth - fetch ) {
I think we need to see some of your code that produces the problem before
making any wild guesses.
More comments below.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish
lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: [EMAIL PROTECTED]
To: "Michael A. Chase" [EMAIL PROTECTED]
Sent: Thursday, March 08, 2001 12:17 PM
Subject: Re: Expat.pm DBI.pm incompatible?
This question belongs in [EMAIL PROTECTED], _NOT_ dbi-dev.
If this is new code, I strongly recommend using DBI instead of Oraperl.
Oraperl.pm is just a wrapper around DBI calls for Oracle, so you are using
it inadvertently anyway. The newer interface provides several ways to check
for errors
You can only put a single data value in each placeholder, no lists. Run
'perldoc DBI' and look in the sections "Placeholders and Bind Values" and
"bind_param" for examples and limits.
If all you are passing are numbers or strings, you can skip bind_param() and
include the bind variable values
This is the DBI list, so database connectivity is not off topic. Normally
you need DBI and a DBD driver, DBD::Oracle or DBD::ODBC in your case. You
need to give us more hints for us to be more specific.
What version of Perl are you using? What platform do you want to create the
ODBC
Comments below.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Peter Loo" [EMAIL PROTECTED]
To: "M
Comments below.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Peter Loo" [EMAIL PROTECTED]
To: "M
:})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Michael A. Chase" [EMAIL PROTECTED]
To: "Peter Loo" [EMAIL PROTECTED
s to it. It is compiled stored procedure
and
we don't have the source for it. I was just asked to write a wrapper
program to call this stored procedure.
0 and 1 are number values, not BOOLEAN.
-Original Message-
From: Michael A. Chase [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001
Any value you add to %ENV is added to the environment of the current process
and any called subprocesses. They won't return to the program that called
the Perl script though.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat
You should be able to build Perl, DBI, and DBD::Oracle on nearly any
platform that has an ANSI C compiler. I have seen messages here about DBI
in AIX, so S390 UNIX should also be possible.
Perl 5.004_03 is getting a bit old. This would be a good chance to upgrade
Perl to 5.6 as well as
MAX( startdate)
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Xiaoxia Dong" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
This is one of those cases where placeholders would save you a lot of grief.
The value inserted into your SQL for $host is not a valid column name. Even
if you quote it, something like "Joe's_PC" would kill it all over again.
Run 'perldoc DBI' to read the fine manual. The sections on
TMTOWTDI: Since Perl is a procedural language, you can just fetch the first
row you
want.
$dbh - {RaiseError} = 1;
my $uptime;
my $sth - prepare( "select uptime
from uptime
where hostname = ?
Comments below.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Steve Howard" [EMAIL PROTECTED]
To: "M
This is a Perl question, not a DBI one. The problem is most likely
happening at the point of return from the subroutine. 'return %start;' is
being evaluated in a scalar context because you are assigning the subroutine
return value to $start. Try assigning it to @start or %start instead.
Unless you have access to a similar system with a C compiler, you won't be
able to build a kit to upload. If you do have a similar system, you will
first have to build perl with the same settings then build DBI and
DBD::mysql.
--
Mac :})
** I normally forward private database questions to the
Microsoft provides ODBC drivers for Access. That should mean you can use
DBD::ODBC with DBI to work with Access. Exactly how useful this is for you
depends on you platform.
Without knowing what you have already tried, and what problems you had, it
will be difficult for anyone on the list to
DBI provides the interface for database access. To do any work, you also
need to install the DBD module for your database (e.g., DBD::Oracle for
Oracle). Follow the instructions through 'make install' for DBI and then
build and install your DBD modules the same way.
Once you have both
What are your source and target databases? As long as you have DBI and
DBD::xxx properly installed, you should be able to open a connection to both
and read from one and write to the other using DBI. The details depend on
what RDBMS you are using.
--
Mac :})
** I normally forward private
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 20, 2001 1:23 PM
Subject: Re: Problems posting to [EMAIL PROTECTED]
Michael do you think you can forward, these questions to the user
community. I would appreciate your help. I can't seem to send
Install Activestate Perl (http://www.ActiveState.com/).
Read the documentation for PPM.
Use PPM to install DBI.
Use PPM to install DBD-Oracle8.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a
Comments below marked with ###.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Matthew Tedder" [EMAIL PROTECTED]
To:
What kind of commands are you considering? It might be better to do them
directly in Perl.
You can do it in DBI if you can from PL/SQL. Note that it would run on the
database server though, not your local host.
You could also have a server process listen on a database pipe for commands
and
I'd probably do it the same way you are describing. A named pipe to
establish communications with the C++ daemon might be helpful. Wrapping the
C++ functions you need in an XS module might be another possibility.
--
Mac :})
** I normally forward private database questions to the DBI mail lists.
There are several example scripts in Oracle.ex/ in the archive
DBD-Oracle-1.06.tar.gz which you can download from CPAN
http://www.cpan.org/.
Run 'perldoc DBI' to read the fine manual which describes (among many other
things) how to establish a database connection.
--
Mac :})
** I normally
If you are using ActiveState's Perl binary distribution, use PPM.
Otherwise, build them like any other module. Once you download the archives
from CPAN, follow the instructions in the README files.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a
If you expect to do this more than once, you should use placeholders. See
below.
I recommend you not use $a and $b outside the comparison block for sort(),
they cause the Perl compiler stage to act in special ways throughout the
code if they are found anywhere.
--
Mac :})
** I normally forward
Is cl.exe on the system path?
Where is it installed? (there have been reports of problems when it is
installed under directories with spaces in the directory names)
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a
Try setting ORACLE_HOME and ORACLE_SID, clearing TWO_TASK, and using
'dbi:Oracle:' for the connect string and see if that helps.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll
Most Perl modules have to be able to compile on a wide variety of C
compilers. As a result, 'unused variables' may occur; they are not normally
a problem.
Make sure your account has at least read and execute permission on all
directories leading up to DBI???.so. You also need to be able to
If "host=localhost;sid=TEST1" in place of "TEST1" works, you have an error
in tnsnames.ora.
How to fix it depends on your platform. Most Win32 Oracle installs have a
Easy*Net icon that starts a program that will build TNS entries for you. On
most other platforms, you will have to add the entry
If "host=localhost;sid=TEST1" in place of "TEST1" works, you have an error
in tnsnames.ora.
How to fix it depends on your platform. Most Win32 Oracle installs have a
Easy*Net icon that starts a program that will build TNS entries for you. On
most other platforms, you will have to add the entry
I got similar results combining DBI 1.15 with DBD::Oracle 1.06 under WinNT
4.0 SP4, Oracle 8.1.5.0.0, and Perl 5.6.0.
Please run this script and send the results to the list:
#!perl -w
use DBI;
use DBD::Oracle qw(ORA_RSET);
use strict;
$| = 1;
my $dbuser = $ENV{ORACLE_USERID} ||
Tim has indicated that there may be a problem with test 55 in t/plsql.t. If
that's your only test failure, there should be no problem installing
DBD::Oracle.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
The exact method Oracle uses to align the types of a DATE column and a
string placeholder can vary and may have performance impacts. Explicitly
converting date strings to Oracle DATEs as shown by Ronald avoids those
risks.
--
Mac :})
** I normally forward private database questions to the DBI
and he'll eat fish for an age.
- Original Message -
From: "Tarou, Kirk" [EMAIL PROTECTED]
To: "'Michael A. Chase'" [EMAIL PROTECTED]
Sent: Tuesday, April 03, 2001 10:55 AM
Subject: RE: DBD::Oracle 'make test' fails (t/plsql 55-63)
Once it fails on test 55, it stops testi
You _might_ get away with it with some RDBMSs, but I wouldn't count on it.
I know for certain it doesn't work with Oracle.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat
One thing you can do with the archive is read all the interesting README
files in there.
If you are using the ActiveState build of Perl, your ought to use PPM to
install DBI and DBD::???. If you aren't, follow the instructions in the
README file.
--
Mac :})
** I normally forward private
You are not giving us much to go on. A short sample of the code that is
calling DBI would help us with our guesses.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for
Not including quotes or placeholders in the second argument to LIKE is very
dangerous. See below.
You are also assuming that all fields will have an associated full_entry
that is not NULL and is suitable as a LIKE matching expression.
--
Mac :})
** I normally forward private database questions
I think it would mostly be a matter of what you are comfortable with.
Embedding perl in a C++ application has a well defined interface, but
probably involves more overhead than a standalone Perl module that provides
the database service. On the gripping hand, the server process may become a
Maybe.
You definitely need at least Pro*C/OCI and SQL*Net to _BUILD_ DBD::Oracle.
You also need to build DBI first.
If the client is Win32, you should be using ActiveState's Perl builds. In
that case, ActiveState has already built DBI and DBD::Oracle for you and you
can install them using PPM.
You can usually connect to most any Oracle 7 or Oracle 8 instance as long as
you go through SQL*Net to get there.
What might cause trouble is if DBD::Oracle was compiled against one version
of Oracle but running in a host (or ORACLE_HOME) with a different version of
the Oracle client software.
There are a couple examples in the output from 'perldoc DBD::Oracle'. You
can also see a working script that calls a procedure if you download
DBD-Oracle-1.06.tar.gz from CPAN and look in Oracle.ex/.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a
Setting LD_LIBRARY_PATH inside a Perl script works in some platforms and
doesn't in others. I'm not sure which are which, so I try real hard to have
all the environment variables set before the script starts.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
My system with ActivePerl has never had DBD::Oracle8 loaded, just
DBD::Oracle.
Is the DBD::Oracle documentation in the Online Documentation in your
DBD::Oracle8 only machine?
If it is a problem with the PPM module, you should report it to ActiveState.
Their mail lists are described at
'Just move the modules' is not the instruction for installing modules in
ActiveState Perl. Look up PPM in the fine Online Documentation that came
with ActiveState Perl and follow the instructions.
The usual 'perl Makefile.pl ...' process doesn't normally work with
ActiveState Perl, but
If it's not ActiveState Perl, you need to build the modules with the same C
compiler and libraries as were used to create Perl. You can find out most
of that information by running 'perl -V'.
If they didn't use MSVC, you will probably also need to use dmake in place
of nmake which is available
If he has MSVC, he has nmake. If he doesn't, he also doesn't have the
compiler or libraries he needs to build DBD::Oracle using nmake.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and
It appears that InterWoven used some version of Microsoft Visual C++ (MSVC)
to build perl.exe. In order to build DBI and DBD::Oracle, you need the
same version of Microsoft Visual C++ (MSVC). If you don't install Microsoft
Visual C++ (MSVC), you have neither a C compiler nor the compatible C
ActiveState has added distributions for Linux and Solaris 2.6 since at least
Build 611 though I don't think I have seen anyone here that is using them
yet.
For most UNIXs, building Perl and supporting modules is very straight
forward. You'd probably be best advised to use ActiveState's Perl for
If you can, install it in the same location as InterWoven used. See the
libpth in 'perl -V' output to tell you where. If you can't, perhaps you can
edit Config.pm to reflect the correct paths to the MSVC components.
--
Mac :})
** I normally forward private database questions to the DBI mail
It was not just you.
If you look at the headers on the bounced messages, the actual subscriber
was forwarding to webdeveloper2000 which apparently was over its quota. I
don't think I've received a bounce from the last couple messages I've sent,
so the offending account has probably been removed
It means exactly what it says, you don't have OCI installed. If you are
going to build DBD::Oracle, you need to have Pro*C or OCI installed.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a
I'm not sure I'd call them friends.
In any case, you should have received instructions that included how to
unsubscribe.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat
Tim has said that there is a problem with test 55 in plsql.t. Since the
following tests depend on it, they should also be ignored.
If you had no other failed tests, you may install DBD::Oracle.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a
Buy and read "Programming the Perl DBI".
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Sumic Leonard" [EMAIL
That's libwin32 version 0.16. It's available in CPAN, but if you are using
ActiveState Perl, you should install it using PPM.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll
Interspersed.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Reuss, Bob" [EMAIL PROTECTED]
To: "'M
This question belongs in dbi-users, not dbi-dev.
Run 'perldoc DBI' and 'perldoc DBD::Oracle' and read the fine manuals.
There are working example scripts in Oracle.ex/ in DBD-Oracle-1.06.tar.gz
which you can download from CPAN. Oracle.ex/commit would be especially
appropriate in your case.
If
This question belongs in dbi-users, not dbi-dev.
Run 'perldoc DBI' and 'perldoc DBD::Oracle' and read the fine manuals.
There are working example scripts in Oracle.ex/ in DBD-Oracle-1.06.tar.gz
which you can download from CPAN. Oracle.ex/commit would be especially
appropriate in your case.
If
If your problem is that plsql.t test 55 failed, this is a known issue with
DBI 1.15 and DBD::Oracle 1.06. If no other failures were reported, you may
install DBD::Oracle.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish
You'd probably be better off using the prepare() and execute() _methods_ as
described in the fine manuals. Run 'perldoc DBI' to see some examples.
Placeholders would also be a good idea to limit the opportunity for
ill-intentioned users to slip and extra SQL statement in on you.
--
Mac :})
** I
Where did you find those docs? They need to be corrected.
All the examples that appear in the fine manual (perldoc DBD::ODBC) show it
in uppercase and the DBI manual states that the case of the driver name does
matter. The 'dbi' in the DSN is supposed to be lowercase, but uppercase has
been
A.
With sufficient flattery (see Notebooks of Lazarus Long) Tim or some one
else would probably be glad to add them.
You might also look at Oracle-OCI for more direct access to OCI from Perl.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a
You can use a single version for remote database access since DBI, like any
OCI application is compiled against the Oracle OCI libraries. For remote
access, the OCI libraries use SQL*Net which can adapt across various
database versions. Different versions of SQL*Net may require different
This does _NOT_ belong in dbi-dev, so I'm replacing that with dbi-users.
Comments below.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original
Oracle's fine manuals include examples of similar triggers. Reading them
would be a good idea.
Once you've written the CREATE TRIGGER statement, you can use $dbh-do() to
load it, but it would probably be easier to just keep it in its own .sql
file and use SQL*Plus to create it.
--
Mac :})
** I
If the script works from the shell, but not when running from the webserver,
the problem is with the account the webserver is running under. Either the
webserver process doesn't have some of the environment variables set that
your shell account does or some of the required files are not
The most common cause for this is that the webserver process doesn't have
either or both of ORACLE_HOME and LD_LIBRARY_PATH defined or one of them
does not have the correct directories in them. You can usually set
ORACLE_HOME inside your script, but it is usually better to set both in the
Get either Pro*C or OCI installed in the Linux machine. One or the other
should be in the CD or archive you installed the Oracle client software
from.
Please send further questions to dbi-users, Tim is very busy. You will note
that your question was delayed a day for him to forward it to the
You would be far better off getting it added to the webserver configuration.
That way when a new version of Oracle is installed ORACLE_HOME only has to
change in one place.
To see how to change an environment variable in a script, run 'perldeoc
perlvar' and search for %ENV.
--
Mac :})
** I
Those snippets all by themselves look innocuous enough, but I don't see any
error checking. The prepare()s might be failing. If you don't have
$dbh-{RaiseErrors} set, add 'or die Prepare xxx failed, $DBI::errstr\n'
to each prepare() call.
If you do have error checking on, I'd like to see the
Unless you do something to force it, Oracle doesn't actually describe the
statement (fetch table and column information from the database) until
execute() time. Then it also normally fetches the first buffer full of rows
which can be very expensive for large tables.
A SELECT * FROM table may be
DBI is just a way to call SQL. If you will read it, a book on basic SQL
would be a good investment.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
-
1 - 100 of 848 matches
Mail list logo