Re: Easiest way to tell if a table already exists?

2001-04-25 Thread Mike Schienle


On Wednesday, April 25, 2001, at 07:02 PM, Neil Lunn wrote:

>> both return a single row indicating success or failure. The last
>> two return a row for each record in the table. You'd probably be
>> less than thrilled if you have a few million records.
>
> No these means do not return any rows. They return sucess or 
> faliure with
> initiating
> a fetch. In fact no DBMS will return any rows whether there is 
> one record or
> millions until a fetch is called.
>
> A good DBMS will actually fail the statement at the prepare stage.

I'm sure you're right. I just entered the commands straight into 
the MySQL command line on my home system instead of thinking 
about what DBI would do.

My mistake.

Mike Schienle
Interactive Visuals, Inc.
http://www.ivsoftware.com



RE: Easiest way to tell if a table already exists?

2001-04-25 Thread Sterin, Ilya

Why would (select * from foo) take up lost of resources?  Won't it just
place the cursor at the first row and only return when rows are fetched?

Ilya Sterin

-Original Message-
From: Mike Schienle [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 9:43 PM
To: '[EMAIL PROTECTED]'
Subject: Re: Easiest way to tell if a table already exists?



On Wednesday, April 25, 2001, at 06:09 PM, Neil Lunn wrote:

>> -Original Message-
>> From: Thomas von Elling Skifter Eibner [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, April 25, 2001 7:27 AM
>> To: Mark Riehl
>>>
>>> The New Riders MySQL book has the following statements:
>>> SELECT COUNT(*) FROM table_name
>>> SELECT * FROM table_name WHERE 1=0
>>>

>> SELECT 1 FROM table_name (just another variant of yours).

> select * from table_name

These last two certainly work, but they can be pretty wasteful
of resources. The two mentioned in the New Riders MySQL book
both return a single row indicating success or failure. The last
two return a row for each record in the table. You'd probably be
less than thrilled if you have a few million records.

Mike Schienle
Interactive Visuals, Inc.
http://www.ivsoftware.com



RE: Easiest way to tell if a table already exists?

2001-04-25 Thread Neil Lunn

> both return a single row indicating success or failure. The last 
> two return a row for each record in the table. You'd probably be 
> less than thrilled if you have a few million records.

No these means do not return any rows. They return sucess or faliure with
initiating
a fetch. In fact no DBMS will return any rows whether there is one record or
millions until a fetch is called.

A good DBMS will actually fail the statement at the prepare stage.


> 
> Mike Schienle
> Interactive Visuals, Inc.
> http://www.ivsoftware.com
> 

__
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: Easiest way to tell if a table already exists?

2001-04-25 Thread Mike Schienle


On Wednesday, April 25, 2001, at 06:09 PM, Neil Lunn wrote:

>> -Original Message-
>> From: Thomas von Elling Skifter Eibner [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, April 25, 2001 7:27 AM
>> To: Mark Riehl
>>>
>>> The New Riders MySQL book has the following statements:
>>> SELECT COUNT(*) FROM table_name
>>> SELECT * FROM table_name WHERE 1=0
>>>

>> SELECT 1 FROM table_name (just another variant of yours).

> select * from table_name

These last two certainly work, but they can be pretty wasteful 
of resources. The two mentioned in the New Riders MySQL book 
both return a single row indicating success or failure. The last 
two return a row for each record in the table. You'd probably be 
less than thrilled if you have a few million records.

Mike Schienle
Interactive Visuals, Inc.
http://www.ivsoftware.com



OT : HPUX 11 + Perl5.6 + DBI + DBD:Oracle + MQSeries

2001-04-25 Thread Steven Baldwin

My sincere apologies for posting here, but I've tried the Perl news groups
without success, and am desperate to get this working.

I have (after experiencing the usual pain), got DBI-1.14 and DBD-Oracle-1.06
working quite OK.  I now want to install the MQSeries module.  I've done it
on a sun machine we have, and everything worked fine.  That is, Perl 5.6,
DBI-1.14, DBD-Oracle-1.06 (Oracle 8.1.7), and MQSeries-1.13.  The exact same
versions on HPUX-11 builds OK, but on the 'make test' fails to connect to
the queue manager.  I suspect it has something to do with needing to rebuild
Perl to use threads that is killing MQ.  I've tried the guy who maintains
the MQ module, but he doesn't have the gear to test it.

If anyone out there has managed to get the above combinations working on
HPUX-11, I would love to hear from you.

Thanks in hope,

Steve Baldwin



Total Environment allocation failure!

2001-04-25 Thread roberto l

Hi, I'm working with: Solaris 7, latest DBI latest DBD::DB2 module and
DB2 v 6.1 and the Apache modified by IBM for the Websphere platform

after the usual pain compiling the db2 module and made it work,
everything went fine until the moment I tried to run scripts from the
web, I've read that in order to run scripts the db2 client must be set
up, running the db2profile script or setting the variables for DB2.

I created a little perl script that goes as follows:

#!/usr/local/bin/perl
use DBI; use CGI qw(:all); $DBI::dbi_debug=9; $q = new CGI;
VARS#
$ENV{LOGNAME}=qq|db2inst1|;
$ENV{ICU_DATA}=qq|/opt/WebSphere/CommerceSuite/bin/icu/data/|;
$ENV{TZ}=qq|Mexico/General|;
$ENV{ADVISOR_SERVER_HOME}=qq|/opt/WebSphere/CommerceSuite/AdvSvr|;
$ENV{LC_ALL}=qq|C|;
$ENV{PWD}=qq|/opt/IBMHTTPD/cgi-bin|;
$ENV{WEBS}=qq|/opt/IBMHTTPD/|;
$ENV{NLSPATH}=qq|/usr/lib/locale/%L/%N:/usr/lib/locale/%L/%N.cat:/usr/lib/locale

/%L/%N:/usr/lib/locale/%L/%N.cat|;
$ENV{HZ}=qq|100|;
$ENV{DB2COMM}=qq|TCPIP|;
$ENV{DB2INSTANCE}=qq|db2inst1|;
$ENV{DB2_HOME}=qq|/opt/IBMdb2/V6.1|;
$ENV{HOME}=qq|/opt/IBMHTTPD|;
$ENV{LD_LIBRARY_PATH}=qq|/opt/WebSphere/CommerceSuite/AdvSvr/lib:/export/home/db

2inst1/sqllib/lib:/usr/java/lib/sparc/green_threads:/opt/WebSphere/CommerceSuite

/bin::/export/home/db2inst1/sqllib/lib:/opt/IBMNetData/lib|;
$ENV{THREADS_TYPE}=qq|native_threads|;
$ENV{LIBPATH}=qq|/export/home/db2inst1/sqllib/odbclib.lib:|;
$ENV{THREADS_FLAG}=qq|native|;
$ENV{CLASSPATH}=qq|.:..:/opt/WebSphere/CommerceSuite/AdvSvr/lib:/opt/WebSphere/C

ommerceSuite/AdvSvr/lib/AdvisorSvr.jar:/opt/WebSphere/CommerceSuite/AdvSvr/lib/A

dvisor.jar:/opt/WebSphere/CommerceSuite/AdvSvr/lib/NdAdvisorCorba.jar:/opt/WebSp

here/CommerceSuite/AdvSvr/lib/AdvisorCOM.jar:/opt/WebSphere/CommerceSuite/AdvSvr

/lib/NdJdbc.jar:/opt/WebSphere/CommerceSuite/AdvSvr/lib/xml4j.jar::/export/home/

db2inst1/sqllib/java/db2java.zip:/export/home/db2inst1/sqllib/java/runtime.zip:.

:/usr/java/lib:/usr/java/lib/classes.zip:/export/home/db2inst1/sqllib/java/db2ja

va.zip|;
$ENV{PATH}=qq|/export/home/db2inst1/sqllib/bin:/export/home/db2inst1/sqllib/adm:

/export/home/db2inst1/sqllib/misc:/usr/bin/../java/bin/../bin:/opt/WebSphere/Com

merceSuite/AdvSvr/bin:/usr/bin::/usr/ccs/bin/make:/usr/local/bin:/export/home/db

2inst1/sqllib/bin:/export/home/db2inst1/sqllib/adm:/export/home/db2inst1/sqllib/

misc:/opt/WebSphere/CommerceSuite/bin|;
$ENV{JAVA_HOME}=qq|/usr/java|;
$ENV{LANG}=qq|en_US|;
VARS#
print $q->header( -type=> "text/html");
print $q->start_html;
while ( ($var,$val) = each(%ENV)){
   print "\$ENV\{$var\}=qq|$val|;", $ENV{SERVER_PROTOCOL} ? "" :
"\n";
}
$dbh = DBI->connect("dbi:DB2:mser","db2inst1","pass**") or die "No
connection";
my $sel = qq |select count(*) from db2inst1.category|;
my $sth = $dbh->prepare($sel);
$sth->execute();
 my $row=$sth->fetchrow_array();
  $sth->finish();
  $dbh->disconnect();
  print $row;
_end_

As you can see I've setup every single variable to connect, but still no
success, I'm still getting the message "Total Environment allocation
failure!  Did you set up
 your DB2 client environment?" at the Apache logs. What is missing? What
I'm left to do? Any hint or lead will be greatly appreciated.

bests


--
De duobus malis, minus est semper eligendum





RE: Easiest way to tell if a table already exists?

2001-04-25 Thread Neil Lunn

> -Original Message-
> From: Thomas von Elling Skifter Eibner [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 7:27 AM
> To: Mark Riehl
> > 
> > The New Riders MySQL book has the following statements:
> > SELECT COUNT(*) FROM table_name
> > SELECT * FROM table_name WHERE 1=0
> > 
> > Each statement will succeed if the table exists.
> > 
> > Any other way (other than calling $dbh->tables() and 
> looping through the
> > results?
> 
> SELECT 1 FROM table_name (just another variant of yours).
> 

select * from table_name

$DBI::state will be 'S0002' if the reason for the error retuned is that the
table does not exist.

Neil

__
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: Install question

2001-04-25 Thread Neil Lunn

> -Original Message-
> From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 6:18 AM
> To: 'Steve Starer '; '[EMAIL PROTECTED] '
> Subject: RE: Install question

> for it to work, but I don't know if OLE modules were ever 
> ported to other
> platforms?  I wouldn't try using ADO on non-win platforms 
> (hope I didn't
> offend anyone).  

Nonetheless DBD::ADO specifically uses Win32::OLE and Win32 registry
specific instructions. For other DCOM ports you're out of luck and doing it
all for yourself.

Looking at this message it seems as though the question arose due to working
with examples in the cheetah book, and not really an attempt to get ADO on
Solaris working. I don't actually have a cheetah book but
this should be made really clear.

Neil

> Maybe someone else can prove me wrong.
> 
> Ilya Sterin
> 
> -Original Message-
> From: Steve Starer
> To: Sterin, Ilya; [EMAIL PROTECTED]
> Sent: 04/25/2001 2:00 PM
> Subject: RE: Install question
> 
> > Are you using ADO?
> No I'm not, and I don't intend to at this time . I think it got
> installed
> when I ran perl against the DBD bundle.
> 
> > connect to Sybase you need to install DBD::Sybase and use
> DBI->connect("dbi:sybase:") as your connect string.
> 
> 
> I have the DBI working with the DBD for Sybase. I ran a query and it
> worked
> as expected. I guess the unexpected part of all of this was 
> getting the
> ADO
> module installed, and then the fact that my test program 
> failed when it
> tried to access the ADO service. My expectation based upon the Cheetah
> book
> was that I'd get a successful execution of the test script.
> 
> 
> Thanks again for your time.
> 
> Regards,
> 
> Steve Starer
> Senior Systems Engineer
> Fahnestock & Company
> (212) 668-1281
> [EMAIL PROTECTED]
> 
>  -Original Message-
> From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 2:21 PM
> To:   'Steve Starer '; '[EMAIL PROTECTED] '
> Subject:  RE: Install question
> 
> Are you using ADO?  You are in a Solaris environment and the required
> modules are not installed?  If you want to connect to Sybase 
> you need to
> isntall DBD::Sybase and use DBI->connect("dbi:sybase:") as your
> connect
> string.
> 
> http://cpan.valueclick.com/modules/by-category/07_Database_Int
> erfaces/DB
> D/
> 
> Ilya Sterin
> 
> -Original Message-
> From: Steve Starer
> To: [EMAIL PROTECTED]
> Sent: 04/25/2001 11:59 AM
> Subject: RE: Install question
> 
> > What's the error message?
> 
> The program name is probe-drivers.pl.
> (roswell::/export/home/sstarer/src/perl)> ./probe-drivers.pl
> Driver: ADO
> install_driver(ADO) failed: Can't locate Win32/OLE/Variant.pm in @INC
> (@INC
> contains: /opt/lib/perl5/5.6.0/sun4-solaris /opt/lib/perl5/5.6.0
> /opt/lib/perl5 /usr/local/lib/perl5/5.6.0/sun4-solaris
> /usr/local/lib/perl5/5.6.0
> /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
> /usr/local/lib/perl5/site_perl/5.6.0
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris
> /usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl .)
> at
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/ADO.pm line 562.
> BEGIN failed--compilation aborted at
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/ADO.pm line 562.
> Compilation failed in require at (eval 1) line 3.
> Perhaps a module that DBD::ADO requires hasn't been fully installed
>  at ./probe-drivers.pl line 12
> 
> thanks for the incredibly quick reply!
> 
> Regards,
> 
> Steve Starer
> Senior Systems Engineer
> Fahnestock & Company
> (212) 668-1281
> [EMAIL PROTECTED]
> 
>  -Original Message-
> From: Sterin, Ilya [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 25, 2001 12:07 PM
> To:   'Steve Starer '; '[EMAIL PROTECTED] '
> Subject:  RE: Install question
> 
> What's the error message?
> 
> -Original Message-
> From: Steve Starer
> To: [EMAIL PROTECTED]
> Sent: 04/25/2001 9:55 AM
> Subject: Install question
> 
> Hope this is the right place to post. I sent mail to get the 
> FAQ and am
> awaiting a reply. In the meantime...
> I'm in a Sybase/Solaris environment. New to Solaris, and new to Perl.
> I just installed DBI. I need it to hit a Sybase database. I 
> grabbed the
> DBD
> bundle first, and it installed it thinking it was for Sybase, but also
> included other modules, in particular, ADO.pm which seems to be for
> Microsoft.
> I can hit my Sybase server fine, but as I'm new, I've been 
> studying the
> cheetah, and the first program in its chapter 3 is a probe of 
> available
> sources. It dies with a large error message referencing  @INC,
> ultimately
> stating that perhaps I didn't install ADO properly.
> 
> I would love to back that module out, or fix it, and even better,
> understand what I did wrong so I don't repeat the crime.
> Any/All answers are gratefully appreciated.
> 
> Thanks!
> 
> 
> Regards,
> 
> Steve Starer
> Senior Systems Engineer
> Fahnestock & Company
> (212) 668-1281
>

RE: HP-UX, DBI make problem

2001-04-25 Thread Eisert, Mark

Finally got the DBD::Oracle 1.06 to work on HP-UX 11 system using gcc. 

However, I had to go back a version for both Perl and DBI from the latest
stable releases to 5.6.0 and 1.14 respectively.

Tried Perl 5.6.1 w/ DBI 1.15, but could only get Perl to test succesfully as
multithreaded, 

despite the masses who said this will not work.  The DBI was ridled with
bugs so I backed 

down to running the older version of DBI 1.14 and Perl 5.6.0 as suggested by
Licoln 4/24.

Thanks also to Tony Foiani's who pointed me to 

http://www.geocrawler.com/archives/3/183/2001/1//5027133/
 

which got me 9/10 of the way through the bugs.

In summary I simply added the two libraries -lcl -lpthread at the config
prompt

Any additional libraries?
as suggested in the directions and used the perl option -Ubincompat5005 when
making to assure that perl was not 

binary compatilbe with 5005 release, read from another thread.

Because I am running the gcc compiler some of the bugs did not exist, for
example I did not have to "-Wl,+s" and "-Wl,+n" flags.

The Oracle bug was also different when building the DBD 1.06 in my case for
whatever reason.

Instead, I ran into a seperate set of Unresolved symbols:
JNI_GetDefaultJavaVMInitArgs and JNI_CreateJavaVM.

After prying through the $ORACLE_HOME/lib using the find_symbol function
utility to locate symbols, I found these missing links

in static libraries in the $ORACLE_HOME/lib dir so it was already being
referenced.  Therefore, the DBD needed to be built

statically.  The DBD built, tested and installed.

Well, I hope this helps others.

 System stats

perl -V

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
osname=hpux, osvers=11.00, archname=PA-RISC2.0
uname='hp-ux gpnd004 b.11.00 u 9000800 151901507 unlimited-user license
'
config_args='-Ubincompat5005 -Dcc=gcc
-Dprefix=/home/context/meisert/perl5.6.0/'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef 
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
cc='gcc', optimize='-O', gccversion=2.9-hppa-991112
cppflags='-D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN
-fno-strict-aliasing -I/usr/local/include'
ccflags ='-D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN
-fno-strict-aliasing -I/usr/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lcl -lpthread -lnsl -lnm -lndbm -ldld -lm -lc -lndir -lcrypt -lsec
libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-B,deferred '
cccdlflags='-fpic', lddlflags='-b -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options:
  Built under hpux
  Compiled at Apr 24 2001 20:17:52
  @INC:
/home/context/meisert/perl5.6.0//lib/5.6.0/PA-RISC2.0
/home/context/meisert/perl5.6.0//lib/5.6.0
/home/context/meisert/perl5.6.0//lib/site_perl/5.6.0/PA-RISC2.0
/home/context/meisert/perl5.6.0//lib/site_perl/5.6.0
/home/context/meisert/perl5.6.0//lib/site_perl
.

-

-Original Message-
From: "Ferré, Oscar" [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 24, 2001 11:47 AM
To: Eisert, Mark; '[EMAIL PROTECTED]'
Subject: RE: HP-UX, DBI make problem



Help !!! 

I have a same problem 

Perl: 5.6.1 
Os: HP-UX 11.0 
DBI: 1.14 


This is my log 

  /usr/bin/perl -I/opt/perl5/lib/5.6.1/PA-RISC2.0 -I/opt/perl5/lib/5.6.1 / 
opt/perl5/lib/5.6.1/ExtUtils/xsubpp  -typemap
/opt/perl5/lib/5.6.1/ExtUtils/type 
map DBI.xs > DBI.xsc && mv DBI.xsc DBI.c 
gcc -c  -D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN
-fno-strict-alia 
sing -O-DVERSION=\"1.14\"  -DXS_VERSION=\"1.14\" -fpic
-I/opt/perl5/lib/5.6. 
1/PA-RISC2.0/CORE -Wall -Wno-comment -DDBI_NO_THREADS DBI.c 
DBI.xs: In function `dbih_make_com': 
DBI.xs:691: parse error before `l' 
DBI.xs: In function `dbih_clearcom': 
DBI.xs:840: warning: unused variable `Perl___notused' 
DBI.xs: In function `dbih_get_fbav': 
DBI.xs:977: warning: unused variable `Perl___notused' 
DBI.xs: In function `dbih_set_attr_k': 
DBI.xs:1069: warning: unused variable `Perl___notused' 
DBI.xs: In function `log_where': 
DBI.xs:1481: warning: unused variable `Perl___notused' 
DBI.xs: In function `XS_DBI_dispatch': 
DBI.xs:1905: warning: unused variable `Perl___notused' 
*** Error exit code 1 

Stop. 

If you foun

RE: :Twig

2001-04-25 Thread Sterin, Ilya

I just checked there is for v5.6

Ilya Sterin

-Original Message-
From: XPerl
To: [EMAIL PROTECTED]
Sent: 04/25/2001 2:05 PM
Subject: Re: :Twig

There is no XML::Twig binary package on activestate.. Buy may be I can't
see.?

- Original Message -
From: "Sterin, Ilya" <[EMAIL PROTECTED]>
To: "'Thirumalai, Radhika '" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, April 25, 2001 10:29 PM
Subject: RE: :Twig


This is not a DBI question.  Please refer to appropriate group next
time.
There is a wonderful Perl/XML mailing list on activestate.

You problem is not with XML::Twig but rather not having your PPM
configured/used properly.  I am not sure if XML::Twig even has a binary
package on activestate, you have to check it out.  See PPM docs.

Ilya Sterin

-Original Message-
From: Thirumalai, Radhika
To: [EMAIL PROTECTED]
Sent: 04/25/2001 1:26 PM
Subject: XML::Twig

I'm trying to install XML::Twig and I'm on  Winnt 4.0. Can someone tell
me
how I can get around this error? Thanks.

Radhika.



C:\Perl>ppm
PPM interactive shell (2.1.2) - type 'help' for available commands.
PPM> install XML::Twig
Install package 'XML-Twig?' (y/N): y
Installing package 'XML-Twig'...
Error installing package 'XML-Twig': Could not locate a PPM binary of
'XML-Twig'
 for this platform







RE: DBD

2001-04-25 Thread Sterin, Ilya

Do you have Oracle client installed?  If not you need to install and point
you library path there.

Ilya Sterin

-Original Message-
From: Rozengurtel, Daniel
To: '[EMAIL PROTECTED]'
Sent: 04/25/2001 1:31 PM
Subject: DBD

Hello everybody
I am  installing the DBD::Oracle onto SunSolaris. 
While installing I get this messages:
Evaluating `cat $(LIBHOME)sysliblist`
  expanded `cat /db01/app/oracle/product/8.1.6/lib/sysliblist`
  returned '-lnsl -lsocket -lgen -ldl -lsched'

Died at Makefile.PL line 269.
I opened  makefile and its DBD_ORA_OBJ.o is missing while trying to open
it.
Can anybody help?



_ 
IMPORTANT NOTICES: 
  This message is intended only for the addressee. Please notify
the
sender by e-mail if you are not the intended recipient. If you are not
the
intended recipient, you may not copy, disclose, or distribute this
message
or its contents to any other person and any such actions may be
unlawful.

 Banc of America Securities LLC("BAS") does not accept time
sensitive, action-oriented messages or transaction orders, including
orders
to purchase or sell securities, via e-mail.

 BAS reserves the right to monitor and review the content of all
messages sent to or from this e-mail address. Messages sent to or from
this
e-mail address may be stored on the BAS e-mail system.




RE: Install question

2001-04-25 Thread Sterin, Ilya

Steve, is the script failing when you are using ADO or DBD::Sybase.  You
said that DBD::Sybase worked?  Did it generate a warning or how did you make
it call ADO, unless you tried to connect with it.  Also I have never tried
ADO on anything other than wintel platforms, so not sure about the bug(s) or
if you can even get it to work.  I know you must have OLE modules installed
for it to work, but I don't know if OLE modules were ever ported to other
platforms?  I wouldn't try using ADO on non-win platforms (hope I didn't
offend anyone).  
Maybe someone else can prove me wrong.

Ilya Sterin

-Original Message-
From: Steve Starer
To: Sterin, Ilya; [EMAIL PROTECTED]
Sent: 04/25/2001 2:00 PM
Subject: RE: Install question

> Are you using ADO?
No I'm not, and I don't intend to at this time . I think it got
installed
when I ran perl against the DBD bundle.

> connect to Sybase you need to install DBD::Sybase and use
DBI->connect("dbi:sybase:") as your connect string.


I have the DBI working with the DBD for Sybase. I ran a query and it
worked
as expected. I guess the unexpected part of all of this was getting the
ADO
module installed, and then the fact that my test program failed when it
tried to access the ADO service. My expectation based upon the Cheetah
book
was that I'd get a successful execution of the test script.


Thanks again for your time.

Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]

 -Original Message-
From:   Sterin, Ilya [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, April 25, 2001 2:21 PM
To: 'Steve Starer '; '[EMAIL PROTECTED] '
Subject:RE: Install question

Are you using ADO?  You are in a Solaris environment and the required
modules are not installed?  If you want to connect to Sybase you need to
isntall DBD::Sybase and use DBI->connect("dbi:sybase:") as your
connect
string.

http://cpan.valueclick.com/modules/by-category/07_Database_Interfaces/DB
D/

Ilya Sterin

-Original Message-
From: Steve Starer
To: [EMAIL PROTECTED]
Sent: 04/25/2001 11:59 AM
Subject: RE: Install question

> What's the error message?

The program name is probe-drivers.pl.
(roswell::/export/home/sstarer/src/perl)> ./probe-drivers.pl
Driver: ADO
install_driver(ADO) failed: Can't locate Win32/OLE/Variant.pm in @INC
(@INC
contains: /opt/lib/perl5/5.6.0/sun4-solaris /opt/lib/perl5/5.6.0
/opt/lib/perl5 /usr/local/lib/perl5/5.6.0/sun4-solaris
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl .)
at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/ADO.pm line 562.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/ADO.pm line 562.
Compilation failed in require at (eval 1) line 3.
Perhaps a module that DBD::ADO requires hasn't been fully installed
 at ./probe-drivers.pl line 12

thanks for the incredibly quick reply!

Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]

 -Original Message-
From:   Sterin, Ilya [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, April 25, 2001 12:07 PM
To: 'Steve Starer '; '[EMAIL PROTECTED] '
Subject:RE: Install question

What's the error message?

-Original Message-
From: Steve Starer
To: [EMAIL PROTECTED]
Sent: 04/25/2001 9:55 AM
Subject: Install question

Hope this is the right place to post. I sent mail to get the FAQ and am
awaiting a reply. In the meantime...
I'm in a Sybase/Solaris environment. New to Solaris, and new to Perl.
I just installed DBI. I need it to hit a Sybase database. I grabbed the
DBD
bundle first, and it installed it thinking it was for Sybase, but also
included other modules, in particular, ADO.pm which seems to be for
Microsoft.
I can hit my Sybase server fine, but as I'm new, I've been studying the
cheetah, and the first program in its chapter 3 is a probe of available
sources. It dies with a large error message referencing  @INC,
ultimately
stating that perhaps I didn't install ADO properly.

I would love to back that module out, or fix it, and even better,
understand what I did wrong so I don't repeat the crime.
Any/All answers are gratefully appreciated.

Thanks!


Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]



RE: Install question

2001-04-25 Thread Steve Starer

> Are you using ADO?
No I'm not, and I don't intend to at this time . I think it got installed
when I ran perl against the DBD bundle.

> connect to Sybase you need to install DBD::Sybase and use
DBI->connect("dbi:sybase:") as your connect string.


I have the DBI working with the DBD for Sybase. I ran a query and it worked
as expected. I guess the unexpected part of all of this was getting the ADO
module installed, and then the fact that my test program failed when it
tried to access the ADO service. My expectation based upon the Cheetah book
was that I'd get a successful execution of the test script.


Thanks again for your time.

Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]

 -Original Message-
From:   Sterin, Ilya [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, April 25, 2001 2:21 PM
To: 'Steve Starer '; '[EMAIL PROTECTED] '
Subject:RE: Install question

Are you using ADO?  You are in a Solaris environment and the required
modules are not installed?  If you want to connect to Sybase you need to
isntall DBD::Sybase and use DBI->connect("dbi:sybase:") as your connect
string.

http://cpan.valueclick.com/modules/by-category/07_Database_Interfaces/DBD/

Ilya Sterin

-Original Message-
From: Steve Starer
To: [EMAIL PROTECTED]
Sent: 04/25/2001 11:59 AM
Subject: RE: Install question

> What's the error message?

The program name is probe-drivers.pl.
(roswell::/export/home/sstarer/src/perl)> ./probe-drivers.pl
Driver: ADO
install_driver(ADO) failed: Can't locate Win32/OLE/Variant.pm in @INC
(@INC
contains: /opt/lib/perl5/5.6.0/sun4-solaris /opt/lib/perl5/5.6.0
/opt/lib/perl5 /usr/local/lib/perl5/5.6.0/sun4-solaris
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl .)
at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/ADO.pm line 562.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/ADO.pm line 562.
Compilation failed in require at (eval 1) line 3.
Perhaps a module that DBD::ADO requires hasn't been fully installed
 at ./probe-drivers.pl line 12

thanks for the incredibly quick reply!

Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]

 -Original Message-
From:   Sterin, Ilya [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, April 25, 2001 12:07 PM
To: 'Steve Starer '; '[EMAIL PROTECTED] '
Subject:RE: Install question

What's the error message?

-Original Message-
From: Steve Starer
To: [EMAIL PROTECTED]
Sent: 04/25/2001 9:55 AM
Subject: Install question

Hope this is the right place to post. I sent mail to get the FAQ and am
awaiting a reply. In the meantime...
I'm in a Sybase/Solaris environment. New to Solaris, and new to Perl.
I just installed DBI. I need it to hit a Sybase database. I grabbed the
DBD
bundle first, and it installed it thinking it was for Sybase, but also
included other modules, in particular, ADO.pm which seems to be for
Microsoft.
I can hit my Sybase server fine, but as I'm new, I've been studying the
cheetah, and the first program in its chapter 3 is a probe of available
sources. It dies with a large error message referencing  @INC,
ultimately
stating that perhaps I didn't install ADO properly.

I would love to back that module out, or fix it, and even better,
understand what I did wrong so I don't repeat the crime.
Any/All answers are gratefully appreciated.

Thanks!


Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]




Re: :Twig

2001-04-25 Thread XPerl

There is no XML::Twig binary package on activestate.. Buy may be I can't
see.?

- Original Message -
From: "Sterin, Ilya" <[EMAIL PROTECTED]>
To: "'Thirumalai, Radhika '" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, April 25, 2001 10:29 PM
Subject: RE: :Twig


This is not a DBI question.  Please refer to appropriate group next time.
There is a wonderful Perl/XML mailing list on activestate.

You problem is not with XML::Twig but rather not having your PPM
configured/used properly.  I am not sure if XML::Twig even has a binary
package on activestate, you have to check it out.  See PPM docs.

Ilya Sterin

-Original Message-
From: Thirumalai, Radhika
To: [EMAIL PROTECTED]
Sent: 04/25/2001 1:26 PM
Subject: XML::Twig

I'm trying to install XML::Twig and I'm on  Winnt 4.0. Can someone tell
me
how I can get around this error? Thanks.

Radhika.



C:\Perl>ppm
PPM interactive shell (2.1.2) - type 'help' for available commands.
PPM> install XML::Twig
Install package 'XML-Twig?' (y/N): y
Installing package 'XML-Twig'...
Error installing package 'XML-Twig': Could not locate a PPM binary of
'XML-Twig'
 for this platform








DBD

2001-04-25 Thread Rozengurtel, Daniel

Hello everybody
I am  installing the DBD::Oracle onto SunSolaris. 
While installing I get this messages:
Evaluating `cat $(LIBHOME)sysliblist`
  expanded `cat /db01/app/oracle/product/8.1.6/lib/sysliblist`
  returned '-lnsl -lsocket -lgen -ldl -lsched'

Died at Makefile.PL line 269.
I opened  makefile and its DBD_ORA_OBJ.o is missing while trying to open it.
Can anybody help?



_ 
IMPORTANT NOTICES: 
  This message is intended only for the addressee. Please notify the
sender by e-mail if you are not the intended recipient. If you are not the
intended recipient, you may not copy, disclose, or distribute this message
or its contents to any other person and any such actions may be unlawful.

 Banc of America Securities LLC("BAS") does not accept time
sensitive, action-oriented messages or transaction orders, including orders
to purchase or sell securities, via e-mail.

 BAS reserves the right to monitor and review the content of all
messages sent to or from this e-mail address. Messages sent to or from this
e-mail address may be stored on the BAS e-mail system.





Re: DBI->connect doesn't pass password to MySQL?

2001-04-25 Thread David Beroff

Hi!

We found the problem; it was an un-escaped "@" in the password.
Argh!!!  (carefully wiping all egg off of my face)

Thanks for your help!

-- David Beroff <[EMAIL PROTECTED]>   Founder/CEO, note.com LLC
P.O. Box 234, Jenkintown, PA 19046-0234 (USA)   http://note.com
Voice: +1 (215) 576-6800   Fax: +1 (215) 576-6853   ICQ: 3652887
Toll-free: 1.800.note.163   Home page: http://David.Beroff.com



RE: :Twig

2001-04-25 Thread Sterin, Ilya

This is not a DBI question.  Please refer to appropriate group next time.
There is a wonderful Perl/XML mailing list on activestate.

You problem is not with XML::Twig but rather not having your PPM
configured/used properly.  I am not sure if XML::Twig even has a binary
package on activestate, you have to check it out.  See PPM docs.

Ilya Sterin

-Original Message-
From: Thirumalai, Radhika
To: [EMAIL PROTECTED]
Sent: 04/25/2001 1:26 PM
Subject: XML::Twig

I'm trying to install XML::Twig and I'm on  Winnt 4.0. Can someone tell
me
how I can get around this error? Thanks.

Radhika.



C:\Perl>ppm
PPM interactive shell (2.1.2) - type 'help' for available commands.
PPM> install XML::Twig
Install package 'XML-Twig?' (y/N): y
Installing package 'XML-Twig'...
Error installing package 'XML-Twig': Could not locate a PPM binary of
'XML-Twig'
 for this platform






XML::Twig

2001-04-25 Thread Thirumalai, Radhika

I'm trying to install XML::Twig and I'm on  Winnt 4.0. Can someone tell me
how I can get around this error? Thanks.

Radhika.


C:\Perl>ppm
PPM interactive shell (2.1.2) - type 'help' for available commands.
PPM> install XML::Twig
Install package 'XML-Twig?' (y/N): y
Installing package 'XML-Twig'...
Error installing package 'XML-Twig': Could not locate a PPM binary of
'XML-Twig'
 for this platform





Re: problem retrieving sp results in Sybase

2001-04-25 Thread Curt Russell Crandall

Totally missed that first one.  I guess I'll have to wrap it in a block
and set $^W = 0.  I'll give the {syb_do_proc_status} =1 a try.

Thank you

> 
> You have two entries in @row that are undef (i.e. - they are NULL in
> the result set).
> 
>  > /tmp/xxx.tmp::EXTtranldr::Apr 25 2001 12:26PM1::1::Apr 25 2001
>  > 12:00AM::0::0::0::0::0::0::0::8
>  > 0
>  > numrows: 2
> 
> The second row (actually the second result set) is the "status" result
> from the stored proc.
> 
> If you are not interested in this value you can set
> $dbh->{syb_do_proc_status} = 1, which should cause $sth->execute() to
> fetch this result value for you and return a failure if it is not 0.
> 
> Michael
> -- 
> Michael Peppler - Data Migrations Inc. - [EMAIL PROTECTED]
> http://www.mbay.net/~mpeppler - [EMAIL PROTECTED]
> International Sybase User Group - http://www.isug.com
> Sybase on Linux mailing list: [EMAIL PROTECTED]
> 




Re: problem retrieving sp results in Sybase

2001-04-25 Thread Michael Peppler

Curt Russell Crandall writes:
 > I'm rewriting a piece of C code that uses the OpenClient libraries to set
 > a row in a process table under certain circumstances.  The chunk of Perl
 > code that handles this is:
 > 
 > package init_process;
 > 
 > ...
 > 
 > my $cmd = "exec sales2..sa_initprocess ", $dbh->quote($item_src) . ",
 > " . $proc_id;
 > my $sth = $dbh->prepare("$cmd") or warn(...);
 > 
 > $sth->execute() or warn(...);
 > 
 > my $numrows = 0;
 > do
 >  {
 >  while (my @row = $sth->fetchrow_array())
 >   {
 >   print join("::", @row), "\n";  ### line 45
 >   ($a, $b, $c, $d, $e, $f, $g, $h, $i) = @row;
 >   }
 >  } while ($sth->{syb_more_results});
 > $sth->finish();
 > 
 > print "numrows: $numrows\n";
 > 
 > The output of this is:
 > Use of uninitialized value at init_process.pm line 45
 > Use of uninitialized value at init_process.pm line 45

You have two entries in @row that are undef (i.e. - they are NULL in
the result set).

 > /tmp/xxx.tmp::EXTtranldr::Apr 25 2001 12:26PM1::1::Apr 25 2001
 > 12:00AM::0::0::0::0::0::0::0::8
 > 0
 > numrows: 2

The second row (actually the second result set) is the "status" result
from the stored proc.

If you are not interested in this value you can set
$dbh->{syb_do_proc_status} = 1, which should cause $sth->execute() to
fetch this result value for you and return a failure if it is not 0.

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



problem retrieving sp results in Sybase

2001-04-25 Thread Curt Russell Crandall

I'm rewriting a piece of C code that uses the OpenClient libraries to set
a row in a process table under certain circumstances.  The chunk of Perl
code that handles this is:

package init_process;

...

my $cmd = "exec sales2..sa_initprocess ", $dbh->quote($item_src) . ",
" . $proc_id;
my $sth = $dbh->prepare("$cmd") or warn(...);

$sth->execute() or warn(...);

my $numrows = 0;
do
 {
 while (my @row = $sth->fetchrow_array())
  {
  print join("::", @row), "\n";  ### line 45
  ($a, $b, $c, $d, $e, $f, $g, $h, $i) = @row;
  }
 } while ($sth->{syb_more_results});
$sth->finish();

print "numrows: $numrows\n";

The output of this is:
Use of uninitialized value at init_process.pm line 45
Use of uninitialized value at init_process.pm line 45
/tmp/xxx.tmp::EXTtranldr::Apr 25 2001 12:26PM1::1::Apr 25 2001
12:00AM::0::0::0::0::0::0::0::8
0
numrows: 2


If I remove the recommended do { } while ($sth->{syb_more_results}) I get:
Use of uninitialized value at init_process.pm line 45
Use of uninitialized value at init_process.pl line 45
/tmp/xxx.tmp::EXTtranldr::Apr 25 2001 12:26PM1::1::Apr 25 2001
12:00AM::0::0::0::0::0::0::0::8
numrows: 1

The second set of results is closer to what I expect, however I don't
understand why Perl thinks @row is an uninit value when it properly gets
the info out of @row.

I ran this in debug mode, and the whole thing seems to execute out of
order.

$sth->finish();
print join("::", @row), "\n";
$numrows++;
($a,...$i) = @row;
while (my @row = $sth->fetchrow_array())
 {
$sth->finish();

and just after the print on @row occurrs, a x @row yields:
empty array


So the questions are:
1.) Why is the recommended way of retrieving stored proc results screwing
this up?
2.) Why is @row uninitialized when I can print its values just fine
3.) Why is the order of execution under the debugger causing the finish to
be called first, etc.

Running with the do {} while() makes the order of execution under -d even
more disordered.

Thanks,
Curt




RE: Install question

2001-04-25 Thread Sterin, Ilya

Are you using ADO?  You are in a Solaris environment and the required
modules are not installed?  If you want to connect to Sybase you need to
isntall DBD::Sybase and use DBI->connect("dbi:sybase:") as your connect
string.

http://cpan.valueclick.com/modules/by-category/07_Database_Interfaces/DBD/

Ilya Sterin

-Original Message-
From: Steve Starer
To: [EMAIL PROTECTED]
Sent: 04/25/2001 11:59 AM
Subject: RE: Install question

> What's the error message?

The program name is probe-drivers.pl.
(roswell::/export/home/sstarer/src/perl)> ./probe-drivers.pl
Driver: ADO
install_driver(ADO) failed: Can't locate Win32/OLE/Variant.pm in @INC
(@INC
contains: /opt/lib/perl5/5.6.0/sun4-solaris /opt/lib/perl5/5.6.0
/opt/lib/perl5 /usr/local/lib/perl5/5.6.0/sun4-solaris
/usr/local/lib/perl5/5.6.0
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl .)
at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/ADO.pm line 562.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/ADO.pm line 562.
Compilation failed in require at (eval 1) line 3.
Perhaps a module that DBD::ADO requires hasn't been fully installed
 at ./probe-drivers.pl line 12

thanks for the incredibly quick reply!

Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]

 -Original Message-
From:   Sterin, Ilya [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, April 25, 2001 12:07 PM
To: 'Steve Starer '; '[EMAIL PROTECTED] '
Subject:RE: Install question

What's the error message?

-Original Message-
From: Steve Starer
To: [EMAIL PROTECTED]
Sent: 04/25/2001 9:55 AM
Subject: Install question

Hope this is the right place to post. I sent mail to get the FAQ and am
awaiting a reply. In the meantime...
I'm in a Sybase/Solaris environment. New to Solaris, and new to Perl.
I just installed DBI. I need it to hit a Sybase database. I grabbed the
DBD
bundle first, and it installed it thinking it was for Sybase, but also
included other modules, in particular, ADO.pm which seems to be for
Microsoft.
I can hit my Sybase server fine, but as I'm new, I've been studying the
cheetah, and the first program in its chapter 3 is a probe of available
sources. It dies with a large error message referencing  @INC,
ultimately
stating that perhaps I didn't install ADO properly.

I would love to back that module out, or fix it, and even better,
understand what I did wrong so I don't repeat the crime.
Any/All answers are gratefully appreciated.

Thanks!


Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]



RE: Install question

2001-04-25 Thread Steve Starer

> What's the error message?

The program name is probe-drivers.pl.
(roswell::/export/home/sstarer/src/perl)> ./probe-drivers.pl
Driver: ADO
install_driver(ADO) failed: Can't locate Win32/OLE/Variant.pm in @INC (@INC
contains: /opt/lib/perl5/5.6.0/sun4-solaris /opt/lib/perl5/5.6.0
/opt/lib/perl5 /usr/local/lib/perl5/5.6.0/sun4-solaris
/usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
/usr/local/lib/perl5/site_perl/5.6.0
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl .) at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/ADO.pm line 562.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/ADO.pm line 562.
Compilation failed in require at (eval 1) line 3.
Perhaps a module that DBD::ADO requires hasn't been fully installed
 at ./probe-drivers.pl line 12

thanks for the incredibly quick reply!

Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]

 -Original Message-
From:   Sterin, Ilya [mailto:[EMAIL PROTECTED]]
Sent:   Wednesday, April 25, 2001 12:07 PM
To: 'Steve Starer '; '[EMAIL PROTECTED] '
Subject:RE: Install question

What's the error message?

-Original Message-
From: Steve Starer
To: [EMAIL PROTECTED]
Sent: 04/25/2001 9:55 AM
Subject: Install question

Hope this is the right place to post. I sent mail to get the FAQ and am
awaiting a reply. In the meantime...
I'm in a Sybase/Solaris environment. New to Solaris, and new to Perl.
I just installed DBI. I need it to hit a Sybase database. I grabbed the
DBD
bundle first, and it installed it thinking it was for Sybase, but also
included other modules, in particular, ADO.pm which seems to be for
Microsoft.
I can hit my Sybase server fine, but as I'm new, I've been studying the
cheetah, and the first program in its chapter 3 is a probe of available
sources. It dies with a large error message referencing  @INC,
ultimately
stating that perhaps I didn't install ADO properly.

I would love to back that module out, or fix it, and even better,
understand what I did wrong so I don't repeat the crime.
Any/All answers are gratefully appreciated.

Thanks!


Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]




RE: Install question

2001-04-25 Thread Sterin, Ilya

What's the error message?

-Original Message-
From: Steve Starer
To: [EMAIL PROTECTED]
Sent: 04/25/2001 9:55 AM
Subject: Install question

Hope this is the right place to post. I sent mail to get the FAQ and am
awaiting a reply. In the meantime...
I'm in a Sybase/Solaris environment. New to Solaris, and new to Perl.
I just installed DBI. I need it to hit a Sybase database. I grabbed the
DBD
bundle first, and it installed it thinking it was for Sybase, but also
included other modules, in particular, ADO.pm which seems to be for
Microsoft. 
I can hit my Sybase server fine, but as I'm new, I've been studying the
cheetah, and the first program in its chapter 3 is a probe of available
sources. It dies with a large error message referencing  @INC,
ultimately
stating that perhaps I didn't install ADO properly. 

I would love to back that module out, or fix it, and even better,
understand what I did wrong so I don't repeat the crime.
Any/All answers are gratefully appreciated.

Thanks!


Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]




Re: PostgreSQL currval()

2001-04-25 Thread Jeff Waugh

>From doc/postgres/sql-createsequence.htm:

"After a sequence is created, you may use the function nextval(seqname) to
get a new number from the sequence. The function
currval('seqname') may be used to determine the number returned by the last
call to nextval(seqname) for the specified sequence in the
current session."

Your error sounds like nextval has not been called yet in the current
session.

HTH,
-Jeff

- Original Message -
From: "K Old" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 25, 2001 11:30 AM
Subject: PostgreSQL currval()


> Hello all,
>
> I'm trying to do the following insert statement and can't seem to get it
to
> work:
>
> INSERT INTO domains (dname, user, pass) VALUES('currval('cust_seq')', bob,
> something);
>
> I am getting the error that says it that cust_seq.currval is not defined.
I
> do have cust_seq defined as a Sequence and am wondering how to reference a
> sequence variable in an insert statement.
>
> Any ideas?
>
> Thanks,
> Kevin





PostgreSQL currval()

2001-04-25 Thread K Old

Hello all,

I'm trying to do the following insert statement and can't seem to get it to 
work:

INSERT INTO domains (dname, user, pass) VALUES('currval('cust_seq')', bob, 
something);

I am getting the error that says it that cust_seq.currval is not defined.  I 
do have cust_seq defined as a Sequence and am wondering how to reference a 
sequence variable in an insert statement.

Any ideas?

Thanks,
Kevin
_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: NULLs

2001-04-25 Thread Tommy Wareing

On Wed, Apr 25, 2001 at 05:19:14PM +0200, Sean Carte wrote:
> I'm trying (unsuccessfully) to get DBI:Pg to insert NULL values into 
> a table. The following works in psql (and dbish):
> 
> 'UPDATE null_test SET dwarf_1=NULL WHERE dwarf_2='Grumpy';'
> 
> It also works in a $dbh->do() statement:
> 
> But when I attempt the same with placeholders:
> 
> $cursor = $dbh->prepare( qq{UPDATE null_test SET dwarf_1=? WHERE 
> dwarf_2=?} )  || die $dbh->errstr;
> $cursor->execute(NULL, 'Grumpy') || die $dbh->errstr;
> 
> Perl complains about the bareword, NULL. Turning off strict results 
> in the string 'NULL' being inserted.
> 
> I'm stuck. Please help.

Perl complains because the word NULL doesn't mean anything to it. And
if you put quotes around it, you'll find the same behaviour as you're
seeing with strict disabled: it'll insert the literal value "NULL".

What you want is

$cursor->execute('', 'Grumpy') || die $dbh->errstr;

Oracle have mentioned in the past that they might differentiate
between NULL and an empty string, but it's going to break so much
code, that I think we're safe with this...

-- 
Tommy Wareing
Software Engineer
Oxford English Dictionary
Oxford University Press




Re: NULLs

2001-04-25 Thread Christian Hammers

On Wed, Apr 25, 2001 at 05:19:14PM +0200, Sean Carte wrote:
> $cursor->execute(NULL, 'Grumpy') || die $dbh->errstr;
Try: $cursor->execute(undef, 'Grumpy') || die $dbh->errstr;

BTW: Is there a Difference between $dbh->errstr and $DBI::errstr ?
I always used the last and it works, too.

bye,

-christian-

-- 
Christian HammersWESTEND GmbH - Aachen und Dueren Tel 0241/701333-0
[EMAIL PROTECTED] Internet & Security for ProfessionalsFax 0241/911879
   WESTEND ist CISCO Systems Partner - Premium Certified



Re: Transaction in PostgreSQL

2001-04-25 Thread Christian Hammers

On Wed, Apr 25, 2001 at 10:43:16AM -0500, K Old wrote:
> Thanks for your reply.  Just for clairfication in the eval{} do I need to do 
> a sth->prepare($statement) then an sth->execute() for each statement in the 
> eval?
Put everything in your eval{} that needs to be "evaluated" and eventually
rolledback. As prepare doesn't do any changes it could theoretically stay
outside but as you probably want to use the same error message you should
put every prepare and every execute for a given transaction into the eval.

bye,

 -christian-

-- 
Christian HammersWESTEND GmbH - Aachen und Dueren Tel 0241/701333-0
[EMAIL PROTECTED] Internet & Security for ProfessionalsFax 0241/911879
   WESTEND ist CISCO Systems Partner - Premium Certified



Re: NULLs

2001-04-25 Thread Ronald J Kimball

On Wed, Apr 25, 2001 at 05:19:14PM +0200, Sean Carte wrote:
> I'm trying (unsuccessfully) to get DBI:Pg to insert NULL values into 
> a table. The following works in psql (and dbish):
> 
> 'UPDATE null_test SET dwarf_1=NULL WHERE dwarf_2='Grumpy';'
> 
> It also works in a $dbh->do() statement:
> 
> But when I attempt the same with placeholders:
> 
> $cursor = $dbh->prepare( qq{UPDATE null_test SET dwarf_1=? WHERE 
> dwarf_2=?} )  || die $dbh->errstr;
> $cursor->execute(NULL, 'Grumpy') || die $dbh->errstr;
> 
> Perl complains about the bareword, NULL. Turning off strict results 
> in the string 'NULL' being inserted.
> 

SQL's NULL is Perl's undef.

$cursor->execute(undef, 'Grumpy') || die $dbh->errstr;

Ronald



DBD problems

2001-04-25 Thread Rozengurtel, Daniel

Hello Kevin
my name is Daniel and I am looking for help with the issue of installing the
DBD::Oracle onto SunSolaris. 
While installing I get this messages:
Evaluating `cat $(LIBHOME)sysliblist`
  expanded `cat /db01/app/oracle/product/8.1.6/lib/sysliblist`
  returned '-lnsl -lsocket -lgen -ldl -lsched'

Died at Makefile.PL line 269.
I opened  makefile and its DBD_ORA_OBJ.o is missing while trying to open it.


I have also been on the http://dbi.symbolstone.org/doc/faq.html site where i
found out that the current version of DBD::Oracle is designed for Oracle 6-7
not for Oracle 8i- the one we are using. What should i do and how can i
resolve the problem, Thank you very much. Daniel 



_ 
IMPORTANT NOTICES: 
  This message is intended only for the addressee. Please notify the
sender by e-mail if you are not the intended recipient. If you are not the
intended recipient, you may not copy, disclose, or distribute this message
or its contents to any other person and any such actions may be unlawful.

 Banc of America Securities LLC("BAS") does not accept time
sensitive, action-oriented messages or transaction orders, including orders
to purchase or sell securities, via e-mail.

 BAS reserves the right to monitor and review the content of all
messages sent to or from this e-mail address. Messages sent to or from this
e-mail address may be stored on the BAS e-mail system.





Re: NULLs

2001-04-25 Thread Tommy Wareing

On Wed, Apr 25, 2001 at 05:38:47PM +0200, Christian Hammers wrote:
> On Wed, Apr 25, 2001 at 04:34:26PM +0100, Tommy Wareing wrote:
> > Oracle have mentioned in the past that they might differentiate
> > between NULL and an empty string, but it's going to break so much
> > code, that I think we're safe with this...
> I would be horrified if any database would treat undef and "" the same.
> "Empty" is a value that you can assign a variable, undef means nobody has
> yet assigned anything to this variable.

My bad: undef is a better value in perl than "" to represent an unknown.

The bad news is that Oracle really does behave in exactly this
manner. Obviously non-character fields cannot store an empty string,
so there's no ambiguity there. But VARCHAR2s, which are the standard
variable length character type does not distinguish between them.

This is because most host languages don't provide any specific value
for "not assigned", and so you need an extra flag variable to indicate
that the main variable doesn't have a reliable value. Alternatively,
you restrict the range of the variable so that one value is never
available, but is instead treated as null (such as 0, or 65535 for
integers: you can see how that'd be a problem).

Either way, it can be a real hassle. :(

-- 
T.



Re: Transaction in PostgreSQL

2001-04-25 Thread K Old

Simon,

Thanks for your reply.  Just for clairfication in the eval{} do I need to do 
a sth->prepare($statement) then an sth->execute() for each statement in the 
eval?

Can you give me an example of two statements?

Thanks,
Kevin


>From: Simon Oliver <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Transaction in PostgreSQL
>Date: Wed, 25 Apr 2001 09:37:06 +0100
>
>Set AutoCommit to 0 to enable transaction, something like:
>
>From the DBI man pages:
>
>$dbh->{AutoCommit} = 0;  # enable transactions, if possible
>   $dbh->{RaiseError} = 1;
>   eval {
>   foo(...)# do lots of work here
>   bar(...)# including inserts
>   baz(...)# and updates
>   $dbh->commit;   # commit the changes if we get this far
>   };
>   if ($@) {
>   warn "Transaction aborted because $@";
>   $dbh->rollback; # undo the incomplete changes
>   # add other application on-error-clean-up code here
>   }
>
>
>K Old wrote:
>
>>Hello,
>>
>>I was wondering if someone could show me the syntax for doing a
>>transaction in Perl via the DBI.  When I try to just send the
>>appropriate SQL, the compiler says to use the DBI to process
>>transactions.  I can't find the appropriate functions to use.
>>
>>Any help is appreciated.
>>
>>Thanks
>>Kevin
>>[EMAIL PROTECTED]
>>_
>>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>--
>   Simon Oliver
>
>---
>   Department of Biomolecular Sciences
>   UMIST, PO Box 88, Sackville St
>   Manchester, M60 1QD
>   United Kingdom
>
>   Phone:  +44 161 200 8912
>   Fax:+44 161 236 0409
>   Mobile: +44 776 183 0327
>   Email:  [EMAIL PROTECTED]
>---
>

_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: NULLs

2001-04-25 Thread Christian Hammers

On Wed, Apr 25, 2001 at 04:34:26PM +0100, Tommy Wareing wrote:
> Oracle have mentioned in the past that they might differentiate
> between NULL and an empty string, but it's going to break so much
> code, that I think we're safe with this...
I would be horrified if any database would treat undef and "" the same.
"Empty" is a value that you can assign a variable, undef means nobody has
yet assigned anything to this variable.

bye,

 -christian-

-- 
Christian HammersWESTEND GmbH - Aachen und Dueren Tel 0241/701333-0
[EMAIL PROTECTED] Internet & Security for ProfessionalsFax 0241/911879
   WESTEND ist CISCO Systems Partner - Premium Certified



Install question

2001-04-25 Thread Steve Starer

Hope this is the right place to post. I sent mail to get the FAQ and am
awaiting a reply. In the meantime...
I'm in a Sybase/Solaris environment. New to Solaris, and new to Perl.
I just installed DBI. I need it to hit a Sybase database. I grabbed the DBD
bundle first, and it installed it thinking it was for Sybase, but also
included other modules, in particular, ADO.pm which seems to be for
Microsoft. 
I can hit my Sybase server fine, but as I'm new, I've been studying the
cheetah, and the first program in its chapter 3 is a probe of available
sources. It dies with a large error message referencing  @INC, ultimately
stating that perhaps I didn't install ADO properly. 

I would love to back that module out, or fix it, and even better,
understand what I did wrong so I don't repeat the crime.
Any/All answers are gratefully appreciated.

Thanks!


Regards,

Steve Starer
Senior Systems Engineer
Fahnestock & Company
(212) 668-1281
[EMAIL PROTECTED]




Re: NULLs

2001-04-25 Thread Sean Carte

At 5:27 pm +0200 25/4/01, Christian Hammers wrote:
>BTW: Is there a Difference between $dbh->errstr and $DBI::errstr ?
>I always used the last and it works, too.

$DBI::errstr refers to the last handle used within DBI, whereas 
$dbh->errstr is associated with the current error flagged against the 
handle $dbh.

Thanks for the help, everybody, with the NULL. I'd tried everything I 
could think of, including setting a $variable = undef; and inserting 
that. It hadn't occurred to me that I might insert undef directly!
-- 
My brain hurts!
SeanC
  Mediatek Training Institute
26 Crart Ave., Berea, Durban, South Africa 
<-- New Address
phone: +27 (0)31 202 1886  [EMAIL PROTECTED] <-- 
New Phone Number
   fax: +27 (0)31 202 1767 
<-- New Fax Number
   



NULLs

2001-04-25 Thread Sean Carte

I'm trying (unsuccessfully) to get DBI:Pg to insert NULL values into 
a table. The following works in psql (and dbish):

'UPDATE null_test SET dwarf_1=NULL WHERE dwarf_2='Grumpy';'

It also works in a $dbh->do() statement:

But when I attempt the same with placeholders:

$cursor = $dbh->prepare( qq{UPDATE null_test SET dwarf_1=? WHERE 
dwarf_2=?} )  || die $dbh->errstr;
$cursor->execute(NULL, 'Grumpy') || die $dbh->errstr;

Perl complains about the bareword, NULL. Turning off strict results 
in the string 'NULL' being inserted.

I'm stuck. Please help.
-- 
My brain hurts!
SeanC
  Mediatek Training Institute
26 Crart Ave., Berea, Durban, South Africa 
<-- New Address
phone: +27 (0)31 202 1886  [EMAIL PROTECTED] <-- 
New Phone Number
   fax: +27 (0)31 202 1767 
<-- New Fax Number
   



RE: Oracle Character Set problem

2001-04-25 Thread Andy Brick

Hi there,

I've tried the various suggestions that people have made and so far no good
(thanks a lot for the help though). Seting NLS_LANG in $ENV makes no
difference whatsoever.

One thing I've noticed is that character 0x9C ( the Windows 1252 oe
ligature ) is mapped to a pound sterling character in WE8ISO8859P1, the
database character set. e acute is mapped to a greek theta (I think) in the
same.

I can understand oe (which is an extension to 8859-1) being mapped
incorrectly. But e acute ? This is the same hexadecimal value in both
Windows-1252 and WE8ISO8859P1, so why does that get corrupted ?

Regards in frustration,

Andy




DBI->connect doesn't pass password to MySQL?

2001-04-25 Thread David Beroff

Hello!

I'm hoping you can help me.  I am getting the error,
   "Access denied for user ... (Using password: NO)"
from a call to DBI->connect, despite the fact that a password is, 
in fact, being passed as its third parameter.

My concern is not a matter of the  *wrong*  password being sent; it's 
that MySQL is reporting that  *no*  password is being sent as all.


I have had to mask the following values for security's sake:
The correct database name is represented by DD
The correct database server hostname is represented by SS
The correct database client hostname is represented by CC
The correct database username is represented by UU
The correct database password is represented by PP


Here is a simple program which demonstrates the problem:

% more simple.pl
#!/usr/bin/perl

use DBI;

$dbh = DBI->connect( "dbi:mysql:database=DD;host=SS", 
 "UU", "PP") || die $DBI::errstr;

$rc = $dbh->disconnect;


You will note that when it is run, the remote server does recognize
that it is user UUU and database client machine CC.  It claims
that the password isn't even being sent:

% simple.pl
DBI->connect(database=DD;host=SS) failed: Access denied for 
user: 'UU@CC' (Using password: NO) at simple.pl line 5
Access denied for user: 'UU@CC' (Using password: NO) at simple.pl
 line 5.


Note that this is the identical error shown when the standard mysql client
is not supplied with a password:

% /usr/local/mysql/bin/mysql --host=SS --user=UU
ERROR 1045: Access denied for user: 'UU@CC' (Using password: NO)


Lest anyone say that I mistyped the password, etc., here's the error 
when I intentionally pass a password, but an incorrect one:

% /usr/local/mysql/bin/mysql --host=SS --user=UU --password=foo
ERROR 1045: Access denied for user: 'UU@CC' (Using password: YES)


Finally, here is an accepted connection when the correct password is used:

% /usr/local/mysql/bin/mysql --host=SS --user=UU --password=PP
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 941988 to server version: 3.22.22

Type 'help' for help.

mysql> Bye


Software versions:

On database client machine:
DBI 1.15
Data::ShowTable 3.3
DBD::mysql (Msql-Mysql-modules) 1.2216

On database server machine:
MySQL 3.22.22 (Yes, I know this is ancient) on database server machine
Corresponding headers, etc., for this install are on database client machine,
and were properly referenced when the above packages were built.


Thank you in advance for any insight that you can lend to this matter!

-- David Beroff <[EMAIL PROTECTED]>   Founder/CEO, note.com LLC
P.O. Box 234, Jenkintown, PA 19046-0234 (USA)   http://note.com
Voice: +1 (215) 576-6800   Fax: +1 (215) 576-6853   ICQ: 3652887
Toll-free: 1.800.note.163   Home page: http://David.Beroff.com



Re: Transaction in PostgreSQL

2001-04-25 Thread Simon Oliver

Set AutoCommit to 0 to enable transaction, something like:

 From the DBI man pages:

$dbh->{AutoCommit} = 0;  # enable transactions, if possible
   $dbh->{RaiseError} = 1;
   eval {
   foo(...)# do lots of work here
   bar(...)# including inserts
   baz(...)# and updates
   $dbh->commit;   # commit the changes if we get this far
   };
   if ($@) {
   warn "Transaction aborted because $@";
   $dbh->rollback; # undo the incomplete changes
   # add other application on-error-clean-up code here
   }


K Old wrote:

> Hello,
> 
> I was wondering if someone could show me the syntax for doing a 
> transaction in Perl via the DBI.  When I try to just send the 
> appropriate SQL, the compiler says to use the DBI to process 
> transactions.  I can't find the appropriate functions to use.
> 
> Any help is appreciated.
> 
> Thanks
> Kevin
> [EMAIL PROTECTED]
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com


-- 
   Simon Oliver

---
   Department of Biomolecular Sciences
   UMIST, PO Box 88, Sackville St
   Manchester, M60 1QD
   United Kingdom

   Phone:  +44 161 200 8912
   Fax:+44 161 236 0409
   Mobile: +44 776 183 0327
   Email:  [EMAIL PROTECTED]
---