Hi All,
First, thanks for taking the time to view this post.
The problem: Use Perl, DBI and DBD-Oracle to deal with Oracle collections.
My OS is WinNT with cygwin, Oracle 8.1.5, Perl 5.8.0, DBI 1.32, DBD-Oracle
1.12
Also, ActiveState Perl 5.6.1 DBI 1.30, DBD-Oracle 1.12
Two Perl installs - no n
Zelena,
A few months back Steve Baldwin was trying to do the same thing. He
posted the final result of his effort which I have attached to this email as
dbdo_cyg.txt
Like Steve said Hope this helps...
"Zelena Endre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I try to c
Manisha
Hello
Hi
I am working with Perl CGi. There is a query where i have to select all
columns in a table and display the data on the web page.
the query is something like
"select * from
But the problem is I am not able to get the column names.
I am using the DBI module. Is there a way to get
Repeat the ppm exercise with DBD::Oracle8 as the target.
> Hmm seems ActiveState did compile the DBD::Oracle against Oracle 7.
> And none of the other PPM repositories I know of contain the module.
Srdjan,
> I have played a bit more
As did I.
> I am not sure if the difference in operating systems is significant
> (Solaris vs. WinNt)?
Behavior is similar but not the same. In my case all the software is on one
machine (I am not connecting remotely).
> oerr ORA 24338
> 24338, 0, "statement
Srdjan,
> Hi,
Howdy,
> Versions:
> Perl: 5.6.1
Mine is 5.8
> DBI: 1.32
> DBD-Oracle: 1.12
Mine are similar
> Operating System: Solaris 5.8
WinNt
> Oracle version: 8.1.7
I am 8.1.5
> Description:
> procedure, the program dumps core.
No core dump here unless DBI->trace(n) is set with 'n' > 1
> Not
I found this interesting:
> 3. You might be able to get away with doing a $prepare->(q{INSERT INTO
> thistab VALUES(now() + ?});
For those who might need the information:
OS WinNT/cygwin, Perl 5.8, Postgres 7.3, DBI 1.32, DBD::Pg 1.21
my $sth = $dbh->prepare( "select entered + '5 day' from temp")
Mark,
> You can _only_ put DML inside a pl/sql block, not DDL.
>
> So your problem was:
>
>1) you tried to put DDL into a pl/sql block (Oracle disallows)
>2) you didn't have a valid block (no begin/end;)
Did you try this at all?
The 'CREATE OR REPLACE...'
ddl works fine. It's not disallo
Colin,
I reviewed the 2nd reference in your orig post.
# we assume this package already exists
my $plsql = q{
CREATE OR REPLACE PACKAGE plsql_example
I don't believe the author actually meant that $plsql could be prepared and
executed. When dealing with code stored in a databa
Colin,
When I try to test this the following error from 'plsql_errstr' indicates
that it is not possible to have multiple statements in a SQL string. The
PL/SQL statements are not being treated individually.
No. Your package spec is trying to contain a package body.
Errors for PACKAGE PLSQL_EXAMP
David,
> numeric when passed a 6 digit number. Here is an example of how it is
> called within Oracle:
> DECLARE
>RetVal NUMBER;
>
> BEGIN
>RetVal := COLLEGE.SPISFINANCIAL ( 123456 );
> END;
Try calling it the same way wrapped in a begin end block in DBI
> eval {
> my $func = $dbh->
Jane,
More information is probably required from you to get the help you need.
Have you checked both the ORACLE_HOME and NLS settings?
Was your Oracle install also upgraded (more software installed, a new oracle
home added etc)?
The more background you provide the better the chance for help.
Da
Mike,
Look into sqlnet.ora and see if authentication is enabled. I dug this out
of Ora Docs via google:
ORA-12640: Authentication adapter initialization failed
Cause: The function specified in the authentication table entry for the
service failed.
Action: Enable tracing to determine the exact erro
Hello All,
I just finished 'lending a hand' on an earlier post (see DBD login
failed 1/7/03). The login failed because the db (Oracle) expected to be able
to authenticate the user and could not. One resolution was to disable
authentication. What I want to know is how do I proceed if the applica
Hello all,
Hope this is easy to replicate.
After connect, my code:
my $sth = $dbh->prepare( "select fname, lname, addr, city, state from
person");
# my $sth = $dbh->prepare( "select fname, lname from person");
$sth->execute;
$sth->bind_columns( \$f, \$l, \$a, \$c, \$s );
# $sth->bind_columns( \$f,
Environment WinNt, Perl v5.6.1
code
while (1) {
$dbh = DBI->connect($orcs, $uname, $passw,
{
RaiseError => 0,
PrintError => 0,
AutoCommit => 0
}) or dberr("C");
$conn_count++;
sleep 2;
$dbh->disconnect;
undef $dbh;
sleep 8;
last if $conn_count > 10; # 100 sec total
}
No mem leak, mo
my $port = '1521';
my $orcs = "dbi:Oracle:host=$host;port=$port;sid=$dbname";
Works here,
HTH
"Christian Merz" <[EMAIL PROTECTED]> wrote in message
012101c2a69c$faecff20$[EMAIL PROTECTED]">news:012101c2a69c$faecff20$[EMAIL PROTECTED]...
> Hi folks,
> my 'perldoc DBD::Oracle' says in 'CONNECTING TO
Hi All,
I am probably trying to do something that cannot be done (in this
particular way atleast), but here goes:
Table t consists of 2 columns:
c1 number
c2 CLOB
Stored Proc (in a package) looks like:
PACKAGE BODY LIST_HELP IS
FUNCTION FRETCUR (qparam in T.C1%TYPE)
RETURN LIST_HELP.QCURSOR
Post some code...
"Steve Sapovits" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Has anyone used DBI to create and use Oracle's global temporary tables?
> This mostly works for us, but we're having problems creating multiple
> tables, where the ones after t
Roger,
Compare the below to your connect syntax.
my $mscs = "dbi:Oracle:host=$host;sid=$dbname";
my $dbh;
eval {
$dbh = DBI->connect($mscs, $dbuser, $dbpw, {
RaiseError => 1,
PrintError => 0,
AutoCommit => 0
});
};
You may not need the 'eval' but inspect $mscs
HTH
"Roger
Linda,
Below is an example script I am developing that does something similar
to what you describe. It is a flawed 'solution' in that it grabs all the
records, even if you set it (and this is hard coded - my bad) to view 5 at a
time. A better approach is to use a procedure that is part of a se
:
foreach(@{ $sth1->{pg_type} }) {
print"$_\n";
}
where the table associated with $sth1 has a numeric column, and if so what
is it?
"Jeff Boes" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wed, 2002-04-24 at 10:00, Dave K
Jeff, GB, AnyBody
Checking the Pg.pm (V1.12) file for a type called numeric, I believe I
did not find one. INT2, INT4, INT8, FLOAT4, FLOAT8 and their local
translations int rel float etc. are there however. Armed with this info I
modified foo(bar int4) and another table to see how a table with
I tried this using DBI 1.21, DBD::Pg 1.12, Postgresql 7.2 on winnt, newest
cygwin. No core dump, but I did get a set of 'unprintable' characters from
foreach (@{ $sth->{pg_type} }) {
print"$_\n";
}
Later in the same script with another statement handle querying another
table (no numeric columns)
any chance ever
observes.
Sir Arthur Conan Doyle
>>> David Wheeler <[EMAIL PROTECTED]> 04/22/02 11:59PM >>>
On 4/22/02 9:41 PM, "Dave K" <[EMAIL PROTECTED]> claimed:
> OfCourse posting the error might help
>
> could not connect to server
OfCourse posting the error might help
could not connect to server: Connection refused at ./test_pg.pl line 11.
"Dave K" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi All,
> Well, I did one of those things that make
Hi All,
Well, I did one of those things that makes me ask myself 'What Were You
Thinking!'. A previous post complaining that a particular idiom didn't work
as advertised for DBD::Pg 'inspired' me to upgrade DBI (good), DBD::Pg
(good), then Postgresql itself (this required an upgrade of cygwin
That did it! Thanks Jose!
"Nyimi Jose" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> -Original Message-
> From: Dave K [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 19, 2002 4:16 PM
> To: [EMAIL PROTECT
Not sure about other RDBMs but Oracle allows:
create table nonos("date" date, "More bad things" varchar2(20));
but the columns with 'bad' name can only be accessed the same way ie
select "date", "More bad things"
from nonos;
"Karyn Ulriksen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]
Jose,
Tried that, no good!
Upgraded to DBI 2.01 same result (access violation)
Thanks for the suggestion (the book is in my lap...)
"Nyimi Jose" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> -Original Message-
&g
Hi All,
I'm trying to use driver specific attributes, specifically pg_type:
my @tables = $dbh->tables;
foreach $table (@tables) {
print"Table: $table\n";
$sql = "SELECT * FROM $table";
$sth = $dbh->prepare($sql) or print"Prepare fails\n";
$sth->execute or print"Execute fai
31 matches
Mail list logo