Proposal and Announce : AnyData::Format::Excel

2001-08-07 Thread Kawai,Takanori
I've made a new module AnyData::Format::Excel.
AnyData::Format::Excel is a AnyData parser act on Excel File.
You can use this with DBD::AnyData like below.

It is not released to CPAN but you can get from this URL:
  http://www.hippo2000.net/AnyData-Format-Excel-0.0001.tar.gz

I would really appreciate feedback. 
Thank you .

[Script]
use strict;
use DBI;
my $dbh = DBI->connect('dbi:AnyData:',,,{RaiseError=>1});
$dbh->func('testex', 'Excel', 'test.xls', 'ad_import');
$dbh->do(q/INSERT INTO testex VALUES ('KABA', 123)/);
my $sth = $dbh->prepare("SELECT * FROM testex");
$sth->execute;
while(my $raRow = $sth->fetchrow_arrayref()){
print join("\t", @$raRow), "\n";
}

[NOTE]
If you want to use 'export', you should modify AnyData.pm
like below:

line 645:(Add 'Excel' into the string)
  Before
# insert storable here
if ('XML HTMLtable' =~ /$target_format/) {
  After
# insert storable here
if ('XML HTMLtable Excel' =~ /$target_format/) {

==
Kawai, Takanori(Hippo2000)
   Mail: [EMAIL PROTECTED] [EMAIL PROTECTED]
   http://member.nifty.ne.jp/hippo2000
==


Re: "Can't locate loadable object for module DBI "

2001-08-07 Thread Veeresh

Hi Wilson,

I downloded DBI-1.19.tar.gz from www.prel.com site. Then as per the
instructions i did
make
make test
make install.

I'm using Perl5.

Everything carried  out without any errors.

Thanks in advance,

Regards,
Veeresh.

- Original Message -
From: "Wilson, Doug" <[EMAIL PROTECTED]>
To: "'Veeresh'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, August 08, 2001 4:32 AM
Subject: RE: "Can't locate loadable object for module DBI "


> > Then I installed the DBI.pm as per instructions in the
> > website.The following
> >  is the result
> >
> > Can't locate loadable object for module DBI in @INC (@INC
>
> As per what instructions in what website. It still looks like an
> incorrect installation of DBI. Did you make/make test/make install
> or use the CPAN module or use an ActiveState ppm file? Or did you
> just copy the .pm file somewhere?
>
> -Douglas Wilson




Re: Exporting Data

2001-08-07 Thread mickalo


thanks Neil,

I knew it was something simple, but guess too many hours with other stuff! :)

Thx's

>>On Wed, 8 Aug 2001 12:58:41 +1000 , Neil Lunn <[EMAIL PROTECTED]>   wrote:

>>Hmm. Not really a DBI question but I feel charitable. Beside this might stop
>>people asking in the future. See the code below.
>>>-Original Message-
>>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>>>Sent: Wednesday, August 08, 2001 12:50 PM
>>>To: [EMAIL PROTECTED]
>>>Subject: Exporting Data
>>>
>>>
>>>Hello,
>>>
>>>I'm trying come up with a fast and easy way to export all the 
>>>data from a table
>>>into a file, tab delimited, but haven't alot of success with this. 
>>>
>>>What is the best way to pull all the data from a table, then 
>>>put into a text
>>>file and have it tab delimited for each column value:
>>>
>>>$query = qq|select * from orders|;
>>>$sth = $dbh->prepare($query);
>>>$sth->execute();
>>>
>>>open(FILE,">$export_file");
>>>while(my @rows = $sth->fetchrow_array()) {
>>># THIS IS WHERE I SEEM TO LOOSE IT
>>
>>#Instead of this
>>#print FILE @rows . '\t;
>>print FILE join("\t",@rows) ."\n";

Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=




RE: "Can't locate loadable object for module DBI "

2001-08-07 Thread Neil Lunn


>-Original Message-
>From: Veeresh [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 08, 2001 2:07 AM
>To: [EMAIL PROTECTED]
>Subject: "Can't locate loadable object for module DBI "

>
>Then I installed the DBI.pm as per instructions in the 
>website.The following
> is the result 
>
>Can't locate loadable object for module DBI in @INC (@INC 
>contains: /opt/apps/portal/pin16/opt/portal/6.0/lib 
>/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/sun4-solaris/5.
>00503 /opt/apps/portal/pin16/opt/portal/6.0/lib/perl5 
>/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19 
>/opt/portal/6.0/lib/perl5/sun4-solaris/5.00503 
>/opt/portal/6.0/lib/perl5 
>/opt/portal/6.0/lib/perl5/site_perl/sun4-solaris 
>/opt/portal/6.0/lib .) at 
>/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19/DBI.pm
 

Yikes! I'd like to know where these instructions you describe are so they
could be burnt. The only instructions you should be following are included
with the DBI package in the README (but why don't people do that?) file.



Build/Install instructions:

tar zxvf DVB-x.xx.tar.gz
cd DBI-x.xx
perl Makefile.PL
make
make test
make install





>BEGIN failed--compilation aborted at 
>/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19/DBI.pm
> line 185.
>BEGIN failed--compilation aborted at cust.pl line 7.
>
>I appreciate if anybody suggest solution.
>
>Thanks in advance.
>
>Regards,
>Veers.
>

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: Exporting Data

2001-08-07 Thread Neil Lunn


Hmm. Not really a DBI question but I feel charitable. Beside this might stop
people asking in the future. See the code below.
>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, August 08, 2001 12:50 PM
>To: [EMAIL PROTECTED]
>Subject: Exporting Data
>
>
>Hello,
>
>I'm trying come up with a fast and easy way to export all the 
>data from a table
>into a file, tab delimited, but haven't alot of success with this. 
>
>What is the best way to pull all the data from a table, then 
>put into a text
>file and have it tab delimited for each column value:
>
>$query = qq|select * from orders|;
>$sth = $dbh->prepare($query);
>$sth->execute();
>
>open(FILE,">$export_file");
>while(my @rows = $sth->fetchrow_array()) {
># THIS IS WHERE I SEEM TO LOOSE IT

#Instead of this
#print FILE @rows . '\t;
print FILE join("\t",@rows) ."\n";


>
>}
>close (FILE)
>
>I get each row into the file, but can't get the tab delimited 
>between each
>column value properly and have a "\n" newline at the end of each @rows
>
>Sorry for the basic question, but something is eluding me on this??
>
>THX's
>Mike(mickalo)Blezien
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Thunder Rain Internet Publishing
>Providing Internet Solutions that work!
>http://www.thunder-rain.com
>Tel: 1(225)686-2002
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





Exporting Data

2001-08-07 Thread mickalo

Hello,

I'm trying come up with a fast and easy way to export all the data from a table
into a file, tab delimited, but haven't alot of success with this. 

What is the best way to pull all the data from a table, then put into a text
file and have it tab delimited for each column value:

$query = qq|select * from orders|;
$sth = $dbh->prepare($query);
$sth->execute();

open(FILE,">$export_file");
while(my @rows = $sth->fetchrow_array()) {
# THIS IS WHERE I SEEM TO LOOSE IT

print FILE @rows . '\t;

}
close (FILE)

I get each row into the file, but can't get the tab delimited between each
column value properly and have a "\n" newline at the end of each @rows

Sorry for the basic question, but something is eluding me on this??

THX's
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=




RE: [Patch] RE: DBD-ODBC 0.28 for Cygwin

2001-08-07 Thread Neil Lunn

>  I have this problem during 'make test'.  Is it good/bad? Thanks
>
>t/02simple..ok 7/14DBD::ODBC::st fetchrow failed: 
>[Microsoft][ODBC
>Micro
>soft Access Driver]String data, right truncated on column number 2 (C)
>(SQL-0100
>4)(DBD: st_fetch/SQLFetch (long truncated) err=1) at 
>t/02simple.t line 222.
>t/02simple..ok

Yes that's a little anoying I know. The failure is actually intended by the
test and as the last line shows all tests complete successfully.

__
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.
If you are not the intended recipient, please delete this e-mail and notify
the sender immediately. The contents of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies
unless expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.





RE: "Can't locate loadable object for module DBI "

2001-08-07 Thread Sterin, Ilya

Means that it either didn't install fine, or it's not located in @INC, so
possibly you are either installing it in a different location, under a
different perl installation, than what your script is run with, or you are
messing you your @INC.

Ilya

> -Original Message-
> From: Veeresh [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 07, 2001 12:07 PM
> To: [EMAIL PROTECTED]
> Subject: "Can't locate loadable object for module DBI "
>
>
> Hi all,
>
> Can anybody suggest what's the problem with this Perl Script.
>
> In the beginning I had this problem.
>
> Can't locate DBI.pm in @INC (@INC contains:
> /opt/portal/6.0/lib/perl5/sun4-solaris/5.00503 /opt/portal/6.0/lib/perl5
> /opt/portal/6.0/lib/perl5/site_perl/sun4-solaris /opt/portal/6.0/lib .)
> at ./cust.pl line 7.
> BEGIN failed--compilation aborted at ./cust.pl line 7.
>
> Then I installed the DBI.pm as per instructions in the website.The
> following
>  is the result
>
> Can't locate loadable object for module DBI in @INC (@INC contains:
> /opt/apps/portal/pin16/opt/portal/6.0/lib
> /opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/sun4-solaris/5.00503
> /opt/apps/portal/pin16/opt/portal/6.0/lib/perl5
> /opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19
> /opt/portal/6.0/lib/perl5/sun4-solaris/5.00503 /opt/portal/6.0/lib/perl5
> /opt/portal/6.0/lib/perl5/site_perl/sun4-solaris /opt/portal/6.0/lib .)
> at /opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19/DBI.pm line
> 185
> BEGIN failed--compilation aborted at
> /opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19/DBI.pm line
> 185.
> BEGIN failed--compilation aborted at cust.pl line 7.
>
> I appreciate if anybody suggest solution.
>
> Thanks in advance.
>
> Regards,
> Veers.
>



RE: "Can't locate loadable object for module DBI "

2001-08-07 Thread Sterin, Ilya

Or are you using the right perl installation to execute your script (the
same perl that DBI was installed under)?  Is your DBI.pm in one of the @INC
locations?  Are you using DBI right?

Ilya

> -Original Message-
> From: Wilson, Doug [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 07, 2001 7:02 PM
> To: 'Veeresh'; [EMAIL PROTECTED]
> Subject: RE: "Can't locate loadable object for module DBI "
>
>
> > Then I installed the DBI.pm as per instructions in the
> > website.The following
> >  is the result
> >
> > Can't locate loadable object for module DBI in @INC (@INC
>
> As per what instructions in what website. It still looks like an
> incorrect installation of DBI. Did you make/make test/make install
> or use the CPAN module or use an ActiveState ppm file? Or did you
> just copy the .pm file somewhere?
>
> -Douglas Wilson



Re: Help with editing larg (very large ?) tables

2001-08-07 Thread Michael Peppler

I've done that, and it works just fine, provided you have a primary
key that lends itself to this sort of thing...

Michael

Tim Bunce writes:
 > You could start by just selecting and caching the ROWIDs.
 > 
 > A more sophisticated, and portable, approach is to query the primary
 > key columns and then fetch the first page's worth and record the
 > highest pk value.  For the next page start at the previous pk value.
 > All queries have an order by that matches the pk columns. The DB can
 > read the rows efficiently through the index.
 > 
 > I'm obviously being a little simplistic here - there are many design
 > and implementation issues to consider. It isnt easy to do well. And,
 > for the record, I've never had the need so I'm just spouting unproven
 > theory :)
 > 
 > Tim.
 > 
 > On Tue, Aug 07, 2001 at 08:36:02AM -0400, Stan Brown wrote:
 > > I'm writing a generic table editor in perltk for some operations types to
 > > use.
 > > 
 > > It's going pretty well, but I have run inot a problem that I can't figure
 > > out how to solve. I'm runing against Oracle 7 on HP-UX, and what I have
 > > works pretty well for small (< 10,000) row tables. But it does not work
 > > (for reasons that will become obvious in a moment) on table with, say, a
 > > million rows.
 > > 
 > > Here is waht I starte out with:
 > > 
 > > $MW->Busy;
 > > while ( @extracted_data = $sths->fetchrow_array ) {
 > >my $i = 0;
 > >foreach $col (keys  %cols)
 > >{
 > ># print "Got record for column $col record
 > >$record_qty\n";
 > >$records[$record_qty]{$col} =
 > >$extracted_data[$i];
 > >++$i;
 > >}
 > >++$record_qty;
 > >  }
 > >  $MW->Unbusy();
 > > 
 > >  Then the operator can move around and siplay/edit each record by setting
 > >  the fileds displayed to the appropriate row of the @records array.
 > > 
 > >  The problem with this is obvious, on large data sets. I am making a compy
 > >  of the data, and I run out of virtual memory. So I decided to change to 
 > >  fetchall_arrayref, however, I just ran a test with this, and even though
 > >  it did manage to aquire all the rows of data for 750,000 row table, the
 > >  resident set size of the perl task exceded 1GB. It als took several
 > >  minutes to get all the records.
 > > 
 > >  Presently the only way that I have provided, to move around in teh fetch's
 > >  result record set is "next", and previous" buttons. I probably need to add
 > >  the ability to go directly to record n of the result record set also.
 > > 
 > >  So, here is teh question. Givne that there is (as far as I know) now way
 > >  of getting just the desired record from the result set, how can I rework
 > >  this to be:
 > > 
 > >  1. Faster
 > >  2. More robust (IE not liekly to exced system memory resources).
 > > 
 > >  Sugestions?
 > > 
 > > 
 > > 
 > > -- 
 > > Stan Brown [EMAIL PROTECTED]843-745-3154
 > > Charleston SC.
 > > -- 
 > > Windows 98: n.
 > >useless extension to a minor patch release for 32-bit extensions and
 > >a graphical shell for a 16-bit patch to an 8-bit operating system
 > >originally coded for a 4-bit microprocessor, written by a 2-bit 
 > >company that can't stand for 1 bit of competition.
 > > -
 > > (c) 2000 Stan Brown.  Redistribution via the Microsoft Network is prohibited.

-- 
Michael Peppler - Data Migrations Inc. - http://www.mbay.net/~mpeppler
[EMAIL PROTECTED] - [EMAIL PROTECTED]
International Sybase User Group - http://www.isug.com



RE: "Can't locate loadable object for module DBI "

2001-08-07 Thread Wilson, Doug

> Then I installed the DBI.pm as per instructions in the 
> website.The following
>  is the result 
> 
> Can't locate loadable object for module DBI in @INC (@INC 

As per what instructions in what website. It still looks like an
incorrect installation of DBI. Did you make/make test/make install
or use the CPAN module or use an ActiveState ppm file? Or did you
just copy the .pm file somewhere?

-Douglas Wilson



Testing DBD-1.08

2001-08-07 Thread Dana Kaempen

Good afternoon.

I'm trying to recompile DBD-1.08/DBI-1.14 on AIX 4.3.3, using Perl 5.006.  DBI 
compiled & installed fine; Oracle's running at v8.1.6; I can connect to the database; 
DBD compiled fine; the problem is that one test fails:

Individual test failure:
> # failed test 15 at line 71
> not ok 15

Test summary:
> Failed Test  Status Wstat Total Fail  Failed  List of failed
> ---
> t/general.t  171   5.88%  15
> 1 test skipped.
> Failed 1/5 test scripts, 80.00% okay. 1/228 subtests failed, 99.56% okay.

If I can fix this, I should be home free - only test #15 failed.  The problem is that 
I don't know Oracle and I don't know how to debug this problem (what you see above is 
the output with a VERBOSE make) - can anyone give me a clue as to how I can hunt this 
down?  If so, pretend I'm a complete novice - it'll be easier that way.  :-)

Thank you!

Dana
-- 
..d..ecay

mailto:[EMAIL PROTECTED]

"Keep the wheels rolling." - Anonymous traffic prophet



Non-Select $sth->execute Issue

2001-08-07 Thread Rikin Jariwala

To: DBI-Users,
 
I am having a problem with the standard $sth->prepare, $sth-execute 
sequence
for non-SELECT statements ever since we upgraded from an HP-UX
system to SunOS system.
 
HP-UX 10.20SunOS 5.8
Oracle.pm0.471.06
DBI.pm   0.93 1.14
DBD.pm 1.910.8
Perl 5.005025.6.0
Oracle 7.3.4 8i
 
Heres the scenario, 
 
I have a table that I update using a $sth->prepare, $sth-execute 
sequence. 
On the HP configuration, described above, it works flawlessly, however, 
on 
the Sun box it is giving an error.

desc contact_mech_tcm
 Name  
Null?   Type
 -  

 CONTACT_MECHANISM_ID NOT NULL   NUMBER
 
CONTACT_COUNTRY 
  VARCHAR2(30)
 CONTACT_AREA_CODENOT NULL   
VARCHAR2(30)
 CONTACT_NUMBER   NOT NULL  
VARCHAR2(30)
 LAST_MODIFY_USER_ID
 VARCHAR2(20)
 LAST_MODIFY_TS   NOT NULL  
DATE

--
-- CODE SNIPPET --
--
$upTCM = $dbh->prepare("update $SCHEMA.CONTACT_MECH_TCM
 set CONTACT_AREA_CODE = ?,
 CONTACT_NUMBER = ?,
 LAST_MODIFY_USER_ID = ?,
 LAST_MODIFY_TS = SYSDATE
 where CONTACT_MECHANISM_ID = ?");

$rv = $upTCM->execute(' ',
'1212999',
'TCM_TEST',
1);
 
if ($DBI::err) {
print "$DBI::errstr\n";
} 
--
-- END CODE SNIPPET --
--
---
-- HP-UX --
---
no error
---
---
-- SunOS --
---
ORA-01407: cannot update ("DIR"."CONTACT_MECH_TCM"."CONTACT_AREA_CODE") 
to NULL (DBD ERROR: OCIStmtExecute)
---
 
The error on the SunOS system seems to be due some component that
is trimming, and "NULL"ifying, the "blank" string value bound to the 
CONTACT_AREA_CODE column. Is this correct? 
 
How do I resolve this issue?
 
Your help is greatly appreciated.
 
Thanks,
Rikin

[EMAIL PROTECTED]
 



Installing DBD::ORACLE...

2001-08-07 Thread Carlos Augusto Perez Lima

> Hi,
> 
> I want to know what i make to install driver DBD::ORACLE,... I already
> installed the DBI, but when I going to install the DBD::ORACLE, error "The
> variable ORACLE_HOME is not setting.
> My machine is Compaq Tru64 UNIX and I not have installed the Oracle.
> I want to acess a DB Oracle remotely. The DB is in the WindowsNT 4.0.
> 
> 
> Best Regards.
> 
> att,
> __
> Carlos Augusto Perez Lima
> Bioinformatic - System Administrator
> MBG - Milenia Biotecnologia & Genética
> Londrina, Pr - Brazil.
> 
> http://www.milenia.com.br
> http://www.bioinformatic.cjb.net
> 



"Can't locate loadable object for module DBI "

2001-08-07 Thread Veeresh

Hi all,

Can anybody suggest what's the problem with this Perl Script.

In the beginning I had this problem.

Can't locate DBI.pm in @INC (@INC contains: 
/opt/portal/6.0/lib/perl5/sun4-solaris/5.00503 /opt/portal/6.0/lib/perl5 
/opt/portal/6.0/lib/perl5/site_perl/sun4-solaris /opt/portal/6.0/lib .) at ./cust.pl 
line 7.
BEGIN failed--compilation aborted at ./cust.pl line 7.

Then I installed the DBI.pm as per instructions in the website.The following
 is the result 

Can't locate loadable object for module DBI in @INC (@INC contains: 
/opt/apps/portal/pin16/opt/portal/6.0/lib 
/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/sun4-solaris/5.00503 
/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5 
/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19 
/opt/portal/6.0/lib/perl5/sun4-solaris/5.00503 /opt/portal/6.0/lib/perl5 
/opt/portal/6.0/lib/perl5/site_perl/sun4-solaris /opt/portal/6.0/lib .) at 
/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19/DBI.pm line 185
BEGIN failed--compilation aborted at 
/opt/apps/portal/pin16/opt/portal/6.0/lib/perl5/DBI-1.19/DBI.pm line 185.
BEGIN failed--compilation aborted at cust.pl line 7.

I appreciate if anybody suggest solution.

Thanks in advance.

Regards,
Veers.



Re: Help with editing larg (very large ?) tables

2001-08-07 Thread Tim Bunce

You could start by just selecting and caching the ROWIDs.

A more sophisticated, and portable, approach is to query the primary
key columns and then fetch the first page's worth and record the
highest pk value.  For the next page start at the previous pk value.
All queries have an order by that matches the pk columns. The DB can
read the rows efficiently through the index.

I'm obviously being a little simplistic here - there are many design
and implementation issues to consider. It isnt easy to do well. And,
for the record, I've never had the need so I'm just spouting unproven
theory :)

Tim.

On Tue, Aug 07, 2001 at 08:36:02AM -0400, Stan Brown wrote:
> I'm writing a generic table editor in perltk for some operations types to
> use.
> 
> It's going pretty well, but I have run inot a problem that I can't figure
> out how to solve. I'm runing against Oracle 7 on HP-UX, and what I have
> works pretty well for small (< 10,000) row tables. But it does not work
> (for reasons that will become obvious in a moment) on table with, say, a
> million rows.
> 
> Here is waht I starte out with:
> 
> $MW->Busy;
> while ( @extracted_data = $sths->fetchrow_array ) {
>   my $i = 0;
>   foreach $col (keys  %cols)
>   {
>   # print "Got record for column $col record
>   $record_qty\n";
>   $records[$record_qty]{$col} =
>   $extracted_data[$i];
>   ++$i;
>   }
>   ++$record_qty;
>  }
>  $MW->Unbusy();
> 
>  Then the operator can move around and siplay/edit each record by setting
>  the fileds displayed to the appropriate row of the @records array.
> 
>  The problem with this is obvious, on large data sets. I am making a compy
>  of the data, and I run out of virtual memory. So I decided to change to 
>  fetchall_arrayref, however, I just ran a test with this, and even though
>  it did manage to aquire all the rows of data for 750,000 row table, the
>  resident set size of the perl task exceded 1GB. It als took several
>  minutes to get all the records.
> 
>  Presently the only way that I have provided, to move around in teh fetch's
>  result record set is "next", and previous" buttons. I probably need to add
>  the ability to go directly to record n of the result record set also.
> 
>  So, here is teh question. Givne that there is (as far as I know) now way
>  of getting just the desired record from the result set, how can I rework
>  this to be:
> 
>  1. Faster
>  2. More robust (IE not liekly to exced system memory resources).
> 
>  Sugestions?
> 
> 
> 
> -- 
> Stan Brown [EMAIL PROTECTED]843-745-3154
> Charleston SC.
> -- 
> Windows 98: n.
>   useless extension to a minor patch release for 32-bit extensions and
>   a graphical shell for a 16-bit patch to an 8-bit operating system
>   originally coded for a 4-bit microprocessor, written by a 2-bit 
>   company that can't stand for 1 bit of competition.
> -
> (c) 2000 Stan Brown.  Redistribution via the Microsoft Network is prohibited.



Re: Table aliasing in a SELECT statement

2001-08-07 Thread Ronald J Kimball

On Tue, Aug 07, 2001 at 01:39:00PM -0400, RICHARD A. NAKROSHIS (Contractor) wrote:

> I get a "prepare failed ORA-0900: invalid SQL statement..." which goes
> on to indicate that it does not apparently like the table aliasing.
> 
> Any suggestions?  The query works properly in SQL*Plus, and I can
> otherwise use Perl to make simple queries against the database.

I don't know why the query would work in SQL*Plus but not DBI.  I was going
to suggest that one of the table aliases you used might be a reserved word.

Ronald



Re: Table aliasing in a SELECT statement

2001-08-07 Thread Michael Ragsdale

At 01:39 PM 08/07/2001, RICHARD A. NAKROSHIS (Contractor) wrote:
>I'm using AS 5.6.1 build 626 on NT 4.0, with DBI v1.14 and DBD-Oracle
>v1.08 to connect to a Oracle 7.3.4.5 database.
>
>I have a SQL*Plus query that I run that I wanted to move over to a Perl
>script, but I've ran into a problem.
>
>The SELECT statement pulls from three tables and ten fields, and is in
>this format:
>
>SELECT a.field1, b.field2, b.field3, a.field4, a.field5, alfield6 FROM
>tablea a, tableb b, tablec c WHERE a.field7 = b.field7 AND b.field8 =
>c.field8 AND b.field9 = '42' and b.field10 = 'Q'
>
>I get a "prepare failed ORA-0900: invalid SQL statement..." which goes
>on to indicate that it does not apparently like the table aliasing.

Looks like you have a typo on your last select field.  Perhaps it should be 
a.field6 and not alfield6?


**
* Michael Ragsdale  E-mail: [EMAIL PROTECTED] *
* Programmer/Systems Admin   Voice: 865-974-3957 *
* The University of Tennessee, Knoxville   Fax: 865-974-8474 *
**




RE: Table aliasing in a SELECT statement

2001-08-07 Thread Wilson, Doug


> The SELECT statement pulls from three tables and ten fields, and is in
> this format:
> 
> SELECT a.field1, b.field2, b.field3, a.field4, a.field5, alfield6 FROM
> tablea a, tableb b, tablec c WHERE a.field7 = b.field7 AND b.field8 =
> c.field8 AND b.field9 = '42' and b.field10 = 'Q'
> 
> I get a "prepare failed ORA-0900: invalid SQL statement..." which goes
> on to indicate that it does not apparently like the table aliasing.
> 
> Any suggestions?

I don't see anything wrong. Print out the SQL string and make sure it's
what you expect? You're connecting to the same database as in SQL*Plus,etc?

-Douglas Wilson



RE: Table aliasing in a SELECT statement

2001-08-07 Thread Sterin, Ilya

Aliasing should work just fine.  There might be another problem that you are
overlooking.  Send us a code snippet, so that we can see where the problem
is coming from.  Also you might want to print your query before preparing to
see exactly what is it preparing as well as possibly using DBI->trace() at
level two to get more insides.

Ilya

-Original Message-
From: RICHARD A. NAKROSHIS (Contractor)
To: DBI User's Mailing List
Sent: 8/7/01 11:39 AM
Subject: Table aliasing in a SELECT statement

I'm using AS 5.6.1 build 626 on NT 4.0, with DBI v1.14 and DBD-Oracle
v1.08 to connect to a Oracle 7.3.4.5 database.

I have a SQL*Plus query that I run that I wanted to move over to a Perl
script, but I've ran into a problem.

The SELECT statement pulls from three tables and ten fields, and is in
this format:

SELECT a.field1, b.field2, b.field3, a.field4, a.field5, alfield6 FROM
tablea a, tableb b, tablec c WHERE a.field7 = b.field7 AND b.field8 =
c.field8 AND b.field9 = '42' and b.field10 = 'Q'

I get a "prepare failed ORA-0900: invalid SQL statement..." which goes
on to indicate that it does not apparently like the table aliasing.

Any suggestions?  The query works properly in SQL*Plus, and I can
otherwise use Perl to make simple queries against the database.
-- 
Rick Nakroshis
Applications Interface Manager
SEIT Contract Team

Defense Security Service
Ft. Meade, Maryland



Re: Table aliasing in a SELECT statement

2001-08-07 Thread Hardy Merrill

Not sure what your problem might be - all I can say is I've
done that on Redhat Linux 6.x with Perl 5.00503, DBI 1.14, and
DBD::Oracle 1.06, on Oracle 8i and it works fine.

-- 
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com

RICHARD A. NAKROSHIS (Contractor) [[EMAIL PROTECTED]] wrote:
> I'm using AS 5.6.1 build 626 on NT 4.0, with DBI v1.14 and DBD-Oracle
> v1.08 to connect to a Oracle 7.3.4.5 database.
> 
> I have a SQL*Plus query that I run that I wanted to move over to a Perl
> script, but I've ran into a problem.
> 
> The SELECT statement pulls from three tables and ten fields, and is in
> this format:
> 
> SELECT a.field1, b.field2, b.field3, a.field4, a.field5, alfield6 FROM
> tablea a, tableb b, tablec c WHERE a.field7 = b.field7 AND b.field8 =
> c.field8 AND b.field9 = '42' and b.field10 = 'Q'
> 
> I get a "prepare failed ORA-0900: invalid SQL statement..." which goes
> on to indicate that it does not apparently like the table aliasing.
> 
> Any suggestions?  The query works properly in SQL*Plus, and I can
> otherwise use Perl to make simple queries against the database.
> -- 
> Rick Nakroshis
> Applications Interface Manager
> SEIT Contract Team
> 
> Defense Security Service
> Ft. Meade, Maryland



RE: Table aliasing in a SELECT statement

2001-08-07 Thread Steve Sapovits


I use table aliasing all the time with Oracle, Perl, and DBI.
I'm not sure why yours doesn't work ...  If the error does 
truly indicate an aliasing issue, maybe try different alias
names?


Steve Sapovits
Global Sports Interactive
Work Email: [EMAIL PROTECTED]
Home Email: [EMAIL PROTECTED]
Work Phone: 610-491-7087
Cell:   610-574-7706
Pager:  877-239-4003

> -Original Message-
> From: RICHARD A. NAKROSHIS (Contractor)
> [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, August 07, 2001 1:39 PM
> To:   DBI User's Mailing List
> Subject:  Table aliasing in a SELECT statement
> 
> I'm using AS 5.6.1 build 626 on NT 4.0, with DBI v1.14 and DBD-Oracle
> v1.08 to connect to a Oracle 7.3.4.5 database.
> 
> I have a SQL*Plus query that I run that I wanted to move over to a Perl
> script, but I've ran into a problem.
> 
> The SELECT statement pulls from three tables and ten fields, and is in
> this format:
> 
> SELECT a.field1, b.field2, b.field3, a.field4, a.field5, alfield6 FROM
> tablea a, tableb b, tablec c WHERE a.field7 = b.field7 AND b.field8 =
> c.field8 AND b.field9 = '42' and b.field10 = 'Q'
> 
> I get a "prepare failed ORA-0900: invalid SQL statement..." which goes
> on to indicate that it does not apparently like the table aliasing.
> 
> Any suggestions?  The query works properly in SQL*Plus, and I can
> otherwise use Perl to make simple queries against the database.
> -- 
> Rick Nakroshis
> Applications Interface Manager
> SEIT Contract Team
> 
> Defense Security Service
> Ft. Meade, Maryland



Table aliasing in a SELECT statement

2001-08-07 Thread RICHARD A. NAKROSHIS (Contractor)

I'm using AS 5.6.1 build 626 on NT 4.0, with DBI v1.14 and DBD-Oracle
v1.08 to connect to a Oracle 7.3.4.5 database.

I have a SQL*Plus query that I run that I wanted to move over to a Perl
script, but I've ran into a problem.

The SELECT statement pulls from three tables and ten fields, and is in
this format:

SELECT a.field1, b.field2, b.field3, a.field4, a.field5, alfield6 FROM
tablea a, tableb b, tablec c WHERE a.field7 = b.field7 AND b.field8 =
c.field8 AND b.field9 = '42' and b.field10 = 'Q'

I get a "prepare failed ORA-0900: invalid SQL statement..." which goes
on to indicate that it does not apparently like the table aliasing.

Any suggestions?  The query works properly in SQL*Plus, and I can
otherwise use Perl to make simple queries against the database.
-- 
Rick Nakroshis
Applications Interface Manager
SEIT Contract Team

Defense Security Service
Ft. Meade, Maryland



RE: Help referencing data structure retruned from fetchall_arrayref

2001-08-07 Thread Wilson, Doug

> How can I rference an individul data item returned by 
> fetchall_arrayref?
The same way you'd reference an element in any reference to
an array of array references :)

> 
> Something like:
> 
> $$records$[$row][$col] ?

One too many '$' :
$$records[$row][$col]

or see perldoc perldata.

Cheers,
Douglas Wilson



Cygwin Perl vs. ActiveState Perl

2001-08-07 Thread Timothy C. Phan

Hi All,

  Since Neil has helped me to get the DBD::ODBC to work and my
  perl script can run under cygwin perl now. THanks Neil.

  I'd like to know if anyone has compare the two cygwin vs.
  activestate perls in term of performance, stability, etc.

  Thanks!

---
tcp



RE: [Patch] RE: DBD-ODBC 0.28 for Cygwin

2001-08-07 Thread Timothy C. Phan

Hi Neil,

  This is absolutely wonderful.  Thank you very much.

  I have this problem during 'make test'.  Is it good/bad? Thanks

PERL_DL_NONLAZY=1
/usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.6.1/cy
gwin -I/usr/lib/perl5/5.6.1 -e 'use Test::Harness qw(&runtests $verbose);
$verbo
se=0; runtests @ARGV;' t/*.t
t/01baseok
t/02simple..ok 7/14DBD::ODBC::st fetchrow failed: [Microsoft][ODBC
Micro
soft Access Driver]String data, right truncated on column number 2 (C)
(SQL-0100
4)(DBD: st_fetch/SQLFetch (long truncated) err=1) at t/02simple.t line 222.
t/02simple..ok
t/03dbatt...ok
t/05methok
t/09bindok
All tests successful.
Files=5, Tests=40, 10 wallclock secs ( 1.97 cusr +  3.25 csys =  5.22 CPU)

-Original Message-
From: Neil Lunn [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 7:41 PM
To: 'Timothy C. Phan'; [EMAIL PROTECTED]
Subject: [Patch] RE: DBD-ODBC 0.28 for Cygwin



>-Original Message-
>From: Timothy C. Phan [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, August 07, 2001 6:20 AM
>To: [EMAIL PROTECTED]
>Subject: RE: DBD-ODBC 0.28 for Cygwin
>
>
>Hi,
>
>  I'm actually using ActiveState Perl for a couple of years now.
>  I, however, wanted to try diff version specially the one from
>  Cygwin because I like the way Cygwin perl uses it own libraries
>  instead of MS libs.
>
>  I tried to build the DBD-ODBC and got a lot of compiler problem
>  with the header files from the w32api packages.  Mainly in sql.h
>  sqlext.h...

There is a patch posted to both the DBI and Cygwin archives for this but
since things have changed (location of w32api files) here is a new patch
release. This applies against a clean DBD-ODBC-0.28 distribution.

>From a directory containing both DBD-ODBC-0.28.tar.gz and
DBD-ODBC-0.28.1.patch files:

tar zxvf DBD-ODBC-0.28.tar.gz
cd DBD-ODBC-0.28
patch -p1<../DBD-ODBC-0.28.1.patch
export DBI_DSN="[my test dsn here]"
perl Makefile.PL
make
make test
mak install


-




Simple minded Database metadata module

2001-08-07 Thread Anthony Staines

Hi,
  I've written a module for my own use which provides a
convenient wrapper for the table_info() function in DBI.
I use it in some web front ends to (small!) data warehouses
which I'm writing here.

Two questions - Is there a better solution out there?
 I have looked...

 If there isn't, is the name any good?
   (suggestions gratefully received).

Note that this is presently Version 0.05 or therabouts. If you want it
anyway, e-mail me. Is it worth putting this up on CPAN when it works 
more reliably, or is this just too simple minded for words

It does the following :-

SYNOPSIS
   use DBIx::Information;  ## Note :- I will choose a name acceptable
 to you all before sending it anywhere
   my $dbinf->new($dbh);

   # Get a list of tables in the database
   my @tables = @{ $dbinf->tables()};

   # Get a list of variables in the whole database
   my @variables = @{ $dbinf->variables()};

   # Get a list of the variable in the table called $table_name;
   my @myvariable = @{ $dbinf->variable($table_name)};

   # Get two useful hashes-
   # List keyed by table to anonymous arrays
   #   of the names of the variables in each table
   # Index keyed by variable name to anonymous arrays
   #of the names of the table
   # (or tables) in which each variable occurs.
   #
   my %list  = %{$dbinf->list()};
   my %index = %{$dbinf->index()};

   #Does the variable exist in the specified table?

   my $exists = $dbinf->IsVarinTable($variable_name,$table_name);

DESCRIPTION
 This module provides a convenient interface to the contents
 of a single database, or (possibly) a single schema. I only
 have Mysql, and it *does* work with this. If you have other
 databases fell free to test...

   EXPORT

 Nothing. don't even try.

AUTHOR
 [EMAIL PROTECTED]

SEE ALSO
 the perl manpage.

   TO DO
 # Get the return list, table, variables etc.. ,
   to detect their calling context with wantarray()
   and do the right thing(TM)..
-- 
Anthony Staines, Lecturer in Epidemiology, Department of Public Health,
   UCD, Earlsfort Terrace, Dublin2, Ireland.
   E-mail :- [EMAIL PROTECTED] Web :-http://astaines2.ucd.ie/
 Work :- + 353 1 716 7345   Fax :- +353 1 716 7407
 Home :- + 353 1 849 1089Mobile :- +353 1 86 606 9713   




Help referencing data structure retruned from fetchall_arrayref

2001-08-07 Thread Stan Brown

How can I rference an individul data item returned by fetchall_arrayref?

Something like:

$$records$[$row][$col] ?

I already now what the 2 indexes inot the data structure are (that is I
know which record number, therfore row, I wnat, and which column contains
the data of inteest).

Thanks.

-- 
Stan Brown [EMAIL PROTECTED]843-745-3154
Charleston SC.
-- 
Windows 98: n.
useless extension to a minor patch release for 32-bit extensions and
a graphical shell for a 16-bit patch to an 8-bit operating system
originally coded for a 4-bit microprocessor, written by a 2-bit 
company that can't stand for 1 bit of competition.
-
(c) 2000 Stan Brown.  Redistribution via the Microsoft Network is prohibited.



Re: Query: How to install DBD::Oracle on Irix 6.5?

2001-08-07 Thread David Adams

Thanks for your help Thomas, but I still havn't got DBD::Oracle to work
under Irix.

I tried compiling Perl with -64.  There were so many fails during 'make
test' that I didn't try installing it.

The installed Perl was compiled with -n32 and a colleague got the Irix N32
Development Toolkit for me.
Then I was able to build DBD::Oracle without more than a few warning
messages from the C compiler.  However,
'make test' fails completely, the output is at the end of this message.

I'm told that Oracle 9i has no support for Irix atall, so I think our
long-term strategy is going to be moving our applications on to Sun
hardware.  Also, I have DBD::Proxy running OK, so I do have a short-term
fall-back, but I would like to get this working if I can.

--
David Adams
Computing Services
Southampton University


- Original Message -
From: "Thomas A. La Porte" <[EMAIL PROTECTED]>
To: "David Adams" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, August 03, 2001 4:01 PM
Subject: Re: Query: How to install DBD::Oracle on Irix 6.5?


> You have two options, based on whether you want to build (or have
> built) Perl -64 or -n32.
>
> If you need n32, you'll have to order or download the Irix N32
> Development Toolkit, which provides the basic set of client
> libraries in n32 form, rather than the 64 bit libraries.
>
> Alternatively, you can build with the 64-bit libraries if your
> Perl is already built 64-bit. I found that I needed to set a
> compiler.defaults file with -n32 and -mips3 specified, in order
> to match our version of Perl, and use the N32 Toolkit.
>
> Also, IIRC, I needed to build the Makefile with 'perl Makefile.PL -p'
>
>  -- Tom
>
> Thomas A. La Porte
> DreamWorks SKG
> [EMAIL PROTECTED]
>
> On Fri, 3 Aug 2001, David Adams wrote:
>
> >We have the Oracle 8.1.6 client installed and working on Irix 6.5.
> >I have installed Perl 5.6.1 and DBI 1.18, and have DBD::Proxy working.
> >
> >I have failed to build DBD::Oracle 1.06, with the 'make' failing with the
> >last two lines:
> >
> >cc WARNING:-64 conflicts with -n32; using latter value (-64)
> >ld64:  FATAL12 : Expecting n64 objects: Oracle.o is n32.
> >
> >Also the generated Makefile contains this weird line:
> >
> >EXTRALIBS =  -L$(LIBHOME) echo "-64" ;
>
>fi` -Wl,-woff,16,-woff,84,-woff,85,-woff,134,-rdata_shared,-multigot,-mips3
> >-o build -rpath
>
>/opt/local/oracle/lib -L/opt/local/oracle/network/lib/ -L/opt/local/oracle/
l
> >ib/-lclntsh
> >
> >The README.help file suggests that I should compile Perl with
the -32 -mips2
> >compiler options and re-install, but this advice seems to be for Oracle
7.?.
> >
> >What is needed to install DBD::Oracle with Oracle 8.1.6 on Irix 6.5?
> >I will re-install Perl if I need to, but I can't afford to re-install it
> >repeatedly until I hit on the right options.
> >
> >Thanks.
> >
> >--
> >David Adams
> >Computing Services
> >Southampton University
> >
> >
> >
> >
>
>

 PERL_DL_NONLAZY=1
/opt/local/perl-5.6.1/bin/perl -Iblib/arch -Iblib/lib -I/opt/local/perl-5.6.
1/lib/5.6.1/IP27-irix-64all-ld -I/opt/local/perl-5.6.1/lib/5.6.1 -e 'use
Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/base..FAILED tests 4-5
 Failed 2/5 tests, 60.00% okay
t/general...install_driver(Oracle) failed: Can't load
'blib/arch/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle:
1016126:/opt/local/perl-5.6.1/bin/perl: rld: Fatal Error: unresolvable
symbol in /opt/local/oracle/lib/libclntsh.so.8.0: sqlxfr at
/opt/local/perl-5.6.1/lib/5.6.1/IP27-irix-64all-ld/DynaLoader.pm line 206.
 at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at t/general.t line 20
dubious
 Test returned status 255 (wstat 65280, 0xff00)
t/long..Can't load 'blib/arch/auto/DBD/Oracle/Oracle.so' for
module DBD::Oracle: 1016127:/opt/local/perl-5.6.1/bin/perl: rld: Fatal
Error: unresolvable symbol in /opt/local/oracle/lib/libclntsh.so.8.0: sqlxfr
at /opt/local/perl-5.6.1/lib/5.6.1/IP27-irix-64all-ld/DynaLoader.pm line
206.
 at t/long.t line 4
Compilation failed in require at t/long.t line 4.
BEGIN failed--compilation aborted at t/long.t line 4.
dubious
 Test returned status 255 (wstat 65280, 0xff00)
t/plsql.Can't load 'blib/arch/auto/DBD/Oracle/Oracle.so' for
module DBD::Oracle: 1018742:/opt/local/perl-5.6.1/bin/perl: rld: Fatal
Error: unresolvable symbol in /opt/local/oracle/lib/libclntsh.so.8.0: sqlxfr
at /opt/local/perl-5.6.1/lib/5.6.1/IP27-irix-64all-ld/DynaLoader.pm line
206.
 at t/plsql.t line 17
Compilation failed in require at t/plsql.t line 17.
BEGIN failed--compilation aborted at t/plsql.t line 17.
dubious
 Test returned status 255 (wstat 65280, 0xff00)
t/reauthskipped test on this platform
Failed Test Status Wstat Total Fail  Failed  List of Failed


t/base.t   52  40.00%  4-5

Re: Help with editing larg (very large ?) tables

2001-08-07 Thread Bart Lateur

On Tue, 7 Aug 2001 08:36:02 -0400 (EDT), Stan Brown wrote:

>I'm writing a generic table editor in perltk for some operations types to
>use.

>But it does not work
>(for reasons that will become obvious in a moment) on table with, say, a
>million rows.

> The problem with this is obvious, on large data sets. I am making a compy
> of the data, and I run out of virtual memory.

You are offering the user a GUI with a table containing a million rows?
Are you nuts?  (just kidding) How on earth is the user going to have to
find what he's looking for?

Just offer the user a chance to select the records he's likely to be
interested in. Or create an interface much like the web search engines,
which display only a limited number of results at a time, and where the
user can step between tables.

-- 
Bart.



Help with editing larg (very large ?) tables

2001-08-07 Thread Stan Brown

I'm writing a generic table editor in perltk for some operations types to
use.

It's going pretty well, but I have run inot a problem that I can't figure
out how to solve. I'm runing against Oracle 7 on HP-UX, and what I have
works pretty well for small (< 10,000) row tables. But it does not work
(for reasons that will become obvious in a moment) on table with, say, a
million rows.

Here is waht I starte out with:

$MW->Busy;
while ( @extracted_data = $sths->fetchrow_array ) {
my $i = 0;
foreach $col (keys  %cols)
{
# print "Got record for column $col record
$record_qty\n";
$records[$record_qty]{$col} =
$extracted_data[$i];
++$i;
}
++$record_qty;
 }
 $MW->Unbusy();

 Then the operator can move around and siplay/edit each record by setting
 the fileds displayed to the appropriate row of the @records array.

 The problem with this is obvious, on large data sets. I am making a compy
 of the data, and I run out of virtual memory. So I decided to change to 
 fetchall_arrayref, however, I just ran a test with this, and even though
 it did manage to aquire all the rows of data for 750,000 row table, the
 resident set size of the perl task exceded 1GB. It als took several
 minutes to get all the records.

 Presently the only way that I have provided, to move around in teh fetch's
 result record set is "next", and previous" buttons. I probably need to add
 the ability to go directly to record n of the result record set also.

 So, here is teh question. Givne that there is (as far as I know) now way
 of getting just the desired record from the result set, how can I rework
 this to be:

 1. Faster
 2. More robust (IE not liekly to exced system memory resources).

 Sugestions?



-- 
Stan Brown [EMAIL PROTECTED]843-745-3154
Charleston SC.
-- 
Windows 98: n.
useless extension to a minor patch release for 32-bit extensions and
a graphical shell for a 16-bit patch to an 8-bit operating system
originally coded for a 4-bit microprocessor, written by a 2-bit 
company that can't stand for 1 bit of competition.
-
(c) 2000 Stan Brown.  Redistribution via the Microsoft Network is prohibited.



Core dumps in "make test " for DBD::Oracle - SOLVED

2001-08-07 Thread Real Newbie

Hi,

  Thanks to our list owner who pointed me to the list archives (after I
posted that plea for help), I browsed through the archives and managed to
hunt fown the solution. Also thsnks to Andre since his solution worked.

  The solution is to disable the threads library in libclntsh in Oracle and
relink the Oracle kernel. Then just re-make DBD::Oracle and it works all
right.

Regards


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




Help --> Core dumps in "make test " for DBD::Oracle

2001-08-07 Thread Real Newbie

Hi there,

  I am a new Perl user and one of the requirements that I have is that I
need to connect to an Oracle database from within my Perl programs. I
recently read through the README of DBI and DBD::Oracle and understood what
they were all about.

  Here is the sequence of steps I followed:

1. Downloaded stable.tar.gz from CPAN and installed Perl
2. Tested out by writing some Perl programs
3. Downloaded DBI 1.19 and installed it
4. Downloaded DBD::Oracle 1.07 and attempted to install it.

The steps 1 through 3 went through fine without any errors. During step 4,
the perl Makefile.PL and make steps go through fine. However, when I run the
"make test" step, I get the following output:

# make test
PERL_DL_NONLAZY=1
/usr/bin/perl -Iblib/arch -Iblib/lib -I/opt/perl/lib/5.6.1/i86pc-solaris -I/
opt/perl/lib/5.6.1 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0;
runtests @ARGV;' t/*.t
t/base..dubious
Test returned status 0 (wstat 139, 0x8b)
test program seems to have generated a core
t/general...dubious
Test returned status 0 (wstat 139, 0x8b)
test program seems to have generated a core
DIED. FAILED tests 3-17
Failed 15/17 tests, 11.76% okay
t/long..ok
t/plsql.ok
t/reauthskipped test on this platform
Failed Test Status Wstat Total Fail  Failed  List of Failed


t/base.t   0   139??   ??   %  ??
t/general.t0   13917   15  88.24%  3-17
1 test skipped.
Failed 2/5 test scripts, 60.00% okay. 15/223 subtests failed, 93.27% okay.
*** Error code 29
make: Fatal error: Command failed for target `test_dynamic'

and a core file is generated in the background.

I am using Solaris 2.7 on Intel (on a Compaq Proliant server). Here is the
output of the perl -V command:

# perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=solaris, osvers=2.7, archname=i86pc-solaris
uname='sunos es1 5.7 generic i86pc i386 i86pc '
config_args='-Dprefix=/opt/perl -de'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='gcc', ccflags
='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-I/usr/local/include'
ccversion='', gccversion='2.8.1', gccosandvers='solaris2.7'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib '
libpth=/usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at Aug  7 2001 00:47:47
  @INC:
/opt/perl/lib/5.6.1/i86pc-solaris
/opt/perl/lib/5.6.1
/opt/perl/lib/site_perl/5.6.1/i86pc-solaris
/opt/perl/lib/site_perl/5.6.1
/opt/perl/lib/site_perl
.

I am using Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production - also
on the same machine where Perl (and DBD and DBI reside). I am able to
connect to the database using sqlplus without any problem.

If I try to use DBD as is from within a perl program, I get a coredump. Can
anyone help me and tell me what is wrong. If more details are needed, do let
me know since this is the first time that I am doing something like this.

Regards,
Newbie


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com