long post, Oracle Collections, Nested tables

2003-03-07 Thread Dave K
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

Re: DBD-Oracle-1.12 under cygwin with Oracle 8.1.5.0.0?

2003-02-28 Thread Dave K
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

Re: retrieving column names from a table using DBI module

2003-02-19 Thread Dave K
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

Re: blob error need help

2003-02-17 Thread Dave K
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.

Re: DBI/DBD Oracle dumps core on Solaris 8 when reference cursor returned untouched

2003-02-16 Thread Dave K
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

Re: DBI/DBD Oracle dumps core on Solaris 8 when reference cursor returned untouched

2003-02-15 Thread Dave K
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

Re: Dates and DBD::Pg

2003-02-11 Thread Dave K
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")

Re: DBD::Oracle multiple SQL statements - PL/SQL example

2003-02-10 Thread Dave K
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

Re: DBD::Oracle multiple SQL statements - PL/SQL example

2003-02-10 Thread Dave K
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

Re: DBD::Oracle multiple SQL statements - PL/SQL example

2003-02-07 Thread Dave K
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

Re: Newbie problem with Oracle functions

2003-02-05 Thread Dave K
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->

Re: Please help on PERL upgrading

2003-02-04 Thread Dave K
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

Re: DBD login failed

2003-01-08 Thread Dave K
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

OT Authentication: Apache, PG, Oracle etc

2003-01-08 Thread Dave K
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

Re: [Q] bind_columns no values

2002-12-19 Thread Dave K
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,

Re: dbi help

2002-12-18 Thread Dave K
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

Re: spcifying ports for DBD::Oracle

2002-12-18 Thread Dave K
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

DBI DBD-Oracle and CLOB long post

2002-11-01 Thread Dave K
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

Re: Oracle and global temporary tables

2002-10-04 Thread Dave K
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

Re: Problem with Oracle DBD.

2002-06-11 Thread Dave K
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

Re: question for display n records per page

2002-05-19 Thread Dave K
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

Re: Problem with DBD::Pg and $sth->{pg_type}

2002-04-24 Thread Dave K
: 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

Re: Problem with DBD::Pg and $sth->{pg_type}

2002-04-24 Thread 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

Re: Problem with DBD::Pg and $sth->{pg_type}

2002-04-23 Thread Dave K
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)

Re: Postgres 7.2, DBI DBD::Pg

2002-04-23 Thread Dave K
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

Re: Postgres 7.2, DBI DBD::Pg

2002-04-22 Thread Dave K
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

Postgres 7.2, DBI DBD::Pg

2002-04-22 Thread Dave K
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

Re: Syntax for Driver Specific attributes

2002-04-19 Thread Dave K
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

Re: Keyword "date" instigating error

2002-04-19 Thread Dave K
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]

Re: Syntax for Driver Specific attributes

2002-04-19 Thread Dave K
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

Syntax for Driver Specific attributes

2002-04-19 Thread Dave K
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