Problem with require_version via package DBI
Hi I have a small problem I have an Apache 1.3.17, mod_perl-1.25, perl-5.6.0, ApacheDBI-0.88 and DBI-1.15 on a Solaris 2.8 box. I get the following error when running perl -c myStartupFile.pl: Can't locate object method require_version via package DBI at /q/app3w/perl-5.6.0/lib/site_perl/5.6.0/Apache/DBI.pm line 13. Compilation failed in require at /q/app3w/perl-5.6.0/lib/site_perl/5.6.0/Apache/DBI.pm line 8. BEGIN failed--compilation aborted at /q/app3w/perl-5.6.0/lib/site_perl/5.6.0/Apache/DBI.pm line 8. Compilation failed in require at CSstartup.pl line 15. BEGIN failed--compilation aborted at CSstartup.pl line 15. I found one that had a similar problem; http://projects.is.asu.edu/pipermail/slash-help/1999-April/44.html but his suggested solution does net help. I have the package name in both og my modules, e.g. Apache/DBI.pm and DBI.pm. Anybody know what is wrong? I have had a look at the DBI.pm. Is seems to have a hold on the Exporter so that can not be the problem: From DBI.pm, line 148: use Exporter (); BEGIN { @ISA = qw(Exporter DynaLoader); Any help would be greatly appreciated. Best regards Mikael Hansen
RE: Problem with require_version via package DBI
You do not actually use Apache::DBI in your script. Please Read the documentation. -Original Message- From: Mikael Hansen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 4:38 PM To: Perl DBI users Subject: Problem with require_version via package DBI Hi I have a small problem I have an Apache 1.3.17, mod_perl-1.25, perl-5.6.0, ApacheDBI-0.88 and DBI-1.15 on a Solaris 2.8 box. I get the following error when running perl -c myStartupFile.pl: Can't locate object method require_version via package DBI at /q/app3w/perl-5.6.0/lib/site_perl/5.6.0/Apache/DBI.pm line 13. Compilation failed in require at /q/app3w/perl-5.6.0/lib/site_perl/5.6.0/Apache/DBI.pm line 8. BEGIN failed--compilation aborted at /q/app3w/perl-5.6.0/lib/site_perl/5.6.0/Apache/DBI.pm line 8. Compilation failed in require at CSstartup.pl line 15. BEGIN failed--compilation aborted at CSstartup.pl line 15. I found one that had a similar problem; http://projects.is.asu.edu/pipermail/slash-help/1999-April/44.html but his suggested solution does net help. I have the package name in both og my modules, e.g. Apache/DBI.pm and DBI.pm. Anybody know what is wrong? I have had a look at the DBI.pm. Is seems to have a hold on the Exporter so that can not be the problem: From DBI.pm, line 148: use Exporter (); BEGIN { @ISA = qw(Exporter DynaLoader); Any help would be greatly appreciated. Best regards Mikael Hansen __ 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.
(Fwd) Please help
- Forwarded message from Paul.Pslee [EMAIL PROTECTED] - From: Paul.Pslee [EMAIL PROTECTED] To: Tim.Bunce [EMAIL PROTECTED] Subject: Please help Date: Wed, 9 May 2001 12:35:15 +0800 X-SMTP-HELO: mail1.maxis.net.my X-SMTP-MAIL-FROM: [EMAIL PROTECTED] X-SMTP-RCPT-TO: [EMAIL PROTECTED] X-SMTP-PEER-INFO: leo.netmind.com [172.16.1.115] Mr Tim, Do u know what i missing ? I install DBI-1.15.tar.gz already but this below but cannot compile. Thanks in advance PS.lee install_driver(Proxy) failed: Can't locate RPC/PlClient.pm in @INC (@INC contains: /usr/local/lib/perl5/5.00503/sun4-solaris /usr/local/lib/perl5/5.00503 /usr/local/lib/perl5/site_perl/5.005/sun4-solaris /usr/local/lib/perl5/site_perl/5.005 .) at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/Proxy.pm line 28. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/Proxy.pm line 28. Perhaps a module that DBD::Proxy requires hasn't been fully installed at connect_sql.1.pl line 9 - End forwarded message -
Re: executing atomic transactions in DBI
On Tue, May 08, 2001 at 11:06:58AM -0600, Sterin, Ilya wrote: In the docs shouldn't this be changed... *** If `PrintError' is also on, then the `PrintError' is done before the `RaiseError' *** to *** If `PrintError' is also on, then the `PrintError' is done before the `RaiseError' though 'RaiseError' will override 'PrintError' and the error will be printed as die() rather than warn(). *** Or something like that... Err, why, exactly? Tim.
(Fwd) Oracle DBD
- Forwarded message from Joe Zimmerlin [EMAIL PROTECTED] - Date: Tue, 08 May 2001 14:02:15 -0400 From: Joe Zimmerlin [EMAIL PROTECTED] Organization: Parabon Computation, Inc. X-Accept-Language: en To: [EMAIL PROTECTED] Subject: Oracle DBD Sorry about that last email, I'm running Linux Netscape and it seems to like BASE64 more than anything else... Hello Tim, my name is Joe Zimmerlin and I am one of the millions of developers using DBI with Oracle. I am sure you are pretty busy handling loads of question pertaining to the DBI and DBD::Oracle modules, but I will attempt to get my question in the queue here... I am using DBD::Oracle on an Intel Solaris (2.7) machine running Oracle 8.1.6 standard edition. I have used DBI and DBD::Oracle in PERL CGIs with this setup numerous times before without any problems. However, I have found that, on this particular setup (not sure what is different about this Solaris/Oracle installation), I repeatedly get: install_driver(Oracle) failed: Can't load '/usr/local/lib/perl5/site_perl/5.6.0/i86pc-solaris/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1: /usr/local/bin/perl: fatal: libclntsh.so.8.0: open failed: No such file or directory at /usr/local/lib/perl5/5.6.0/i86pc-solaris/DynaLoader.pm line 200. at (eval 19) line 3 Compilation failed in require at (eval 19) line 3. Perhaps a required shared library or dll isn't installed where expected at /opt/parabon/frontier-enterprise-1.4.0.4/apache/cgi-bin/clientTaskQ.cgi line 219 This appears in the Apache error log upon invocation of this CGI. The CGI doesn't even use DBI until a following POST, but for some reason, it looks like when it tries to load something having to do with DBI, it gives the above message. Have you seen anything like this before? It sorta looks like an Oracle shared object isn't in place. However, I tried reinstalling Oracle from scratch, using my usual procedure which usually works, and I am getting the same results. I am very confused... Another interesting observation - when I run this same PERL CGI from the command-line, it just dumps core and goes away without any kind of diagnostic message, which makes me think even more that it is likely PERL trying to load something. Anyways, any help would be greatly appreciated. If any of this stuff looks familiar, please let me know. Otherwise, I'll let you know what I find upon further investigation... Thanks, Joe Zimmerlin Software Engineer Parabon Computation, Inc. [EMAIL PROTECTED] - End forwarded message -
Re: Tried for weeks but DBI-1.15 will not install
Your perl installation is broken. Tim. On Wed, May 02, 2001 at 06:13:56PM -0400, Simon Yates wrote: Help please! I can execute perl Makefile.PL fine when I run make, I get a bunch of errors. So you could see what I was doing, I ran script. See file attached. typescript my system is red hat 7. have plenty of ram and disk space have perl 5.6.0 installed Please help, Simon
Problem with DBD-Oracle 1.06 on SGI IRIX running 64 bit perl and Oracle client
Hi, When I try to build DBD-Oracle 1.06 on SGI IRIX, I get the following error on perl Makefile.PL: Writing Makefile for DBD::Oracle Argument _ABIN32 isn't numeric in eq at /usr/freeware/lib/perl5/site_perl/5.005/sys/types.ph line 11. Argument _ABIN32 isn't numeric in eq at /usr/freeware/lib/perl5/site_perl/5.005/sys/types.ph line 30. Argument _ABIN32 isn't numeric in eq at /usr/freeware/lib/perl5/site_perl/5.005/sys/types.ph line 39. Argument _ABIN32 isn't numeric in eq at /usr/freeware/lib/perl5/site_perl/5.005/sys/types.ph line 50. Argument _ABIN32 isn't numeric in ne at /usr/freeware/lib/perl5/site_perl/5.005/sys/types.ph line 124. The error happens after the make file is created, but if I try to make the file, then the link line seems to have spurious characters while trying to use the correct flag (-64 -n32 or -32 for the ABI used). The link line looks like this: LD_RUN_PATH= cc -64 -IPA -o blib/arch/auto/DBD/Oracle/Oracle.so -64 -shared Oracle.o dbdimp.o oci7.o oci8.o echo -64 ; fi` -Wl,-woff,16,-woff,84,-woff,85,-woff,134,-rdata_shared,-multigot,-mips3 -o build -rpath /u01/oracle/app/oracle/product/8.1.6/lib -L/u01/oracle/app/oracle/product/8.1.6/network/lib/ -L/u01/oracle/app/oracle/product/8.1.6/lib/ -lclntsh ld64: FATAL 9 : I/O error (echo): No such file or directory *** Error code 2 (bu21) Here is a perl Makefile.PL -v bill 9% perl Makefile.PL -v Using DBI 1.15 installed in /usr/freeware/lib/perl5/site_perl/5.005/irix-64/auto/DBI Configuring DBD::Oracle ... Remember to actually *READ* the README file! Especially if you have any problems. Using Oracle in /u01/oracle/app/oracle/product/8.1.6 Found /u01/oracle/app/oracle/product/8.1.6/rdbms/demo/demo_rdbms.mk Found /u01/oracle/app/oracle/product/8.1.6/otrace/demo/atmoci.mk Using /u01/oracle/app/oracle/product/8.1.6/rdbms/demo/demo_rdbms.mk Reading /u01/oracle/app/oracle/product/8.1.6/rdbms/demo/demo_rdbms.mk. Reading /u01/oracle/app/oracle/product/8.1.6/rdbms/lib/env_rdbms.mk. Read a total of 2017 lines from /u01/oracle/app/oracle/product/8.1.6/rdbms/lib/env_rdbms.mk (including inclusions) Read a total of 2225 lines from /u01/oracle/app/oracle/product/8.1.6/rdbms/demo/demo_rdbms.mk (including inclusions) Deleted SHELL definition: SHELL=/bin/sh Deleted LIB_EXT definition: LIB_EXT=a Deleted OBJ_EXT definition: OBJ_EXT=o Deleted AR definition: AR=ar Deleted AS definition: AS=as Deleted CC definition: CC=cc Deleted CHMOD definition: CHMOD=chmod Deleted CPP definition: CPP=cpp Deleted ECHO definition: ECHO=echo Deleted LD definition: LD=ld Deleted PERL definition: PERL=perl Deleted CFLAGS definition: CFLAGS=$(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(QACCFLAGS) $(PFLAGS)\ $(SHARED_CFLAG) $(USRFLAGS) Deleted LDFLAGS definition: LDFLAGS=-o $@ $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME) ORACLETTLIBS macro redefined by Oracle from $(NTZEOBJ) $(NETLIBS) $(LLIBRDBMS_CLT) $(LLIBWTC) $(LLIBMM) $(CORELIBS)\ $(NETLIBS) $(LLIBRDBMS_CLT) $(LIBPLS_CLT) $(LLIBEPC) $(CORELIBS) \ $(LLIBRDBMS_CLT) $(CORELIBS) to $(NTZEOBJ) $(NETLIBS) $(LLIBRDBMS_CLT) $(LLIBWTC) $(LLIBMM) $(CORELIBS)\ $(NETLIBS) $(LLIBRDBMS_CLT) $(LIBPLS_CLT) $(LLIBEPC) $(CORELIBS) \ $(LLIBRDBMS_CLT) $(LLIBMM) $(NETLIBS) $(LLIBEPC) $(NETLIBS) $(CORELIBS) TTLIBS macro redefined by Oracle from $(LLIBCLNTSH) $(STATICTTLIBS) to $(NAETTOBJS) $(STATICTTLIBS) LINKTTLIBS macro redefined by Oracle from $(LLIBCLNTSH) $(ORACLETTLIBS) $(LINKLDLIBS) to $(NAETTOBJS) $(LLIBCLNTSH) $(ORACLETTLIBS) $(LINKLDLIBS) LDLIBS macro redefined by Oracle from $(EXPDLIBS) $(EXOSLIBS) $(SYSLIBS) $(EXSYSLIBS) $(MATHLIB) $(USRLIBS) to $(EXPDLIBS) $(EXOSLIBS) $(SYSLIBS) $(EXSYSLIBS) $(USRLIBS) Deleted CCFLAGS definition: CCFLAGS=$(FASTCCFLAGS) CPP macro redefined by Oracle from cpp to cc Deleted CPP definition: CPP=cc Deleted OPTIMIZE definition: OPTIMIZE=$(IRIXOPT) Deleted ASFLAGS definition: ASFLAGS = -O2 $(IRIXABI) $(IRIXSWITCH) Deleted CC definition: CC=cc Deleted LD definition: LD=ld LDFLAGS macro redefined by Oracle from -o $@ $(LDPATHFLAG)$(PRODLIBHOME) $(LDPATHFLAG)$(LIBHOME) to -Wl,$(IRIXABI) $(IRIXLD) -o $@ $(SHAREDLIBPATH) -L$(PRODUCT_LIBHOME) -L$(LIBHOME) Deleted LDFLAGS definition: LDFLAGS= -Wl,$(IRIXABI) $(IRIXLD) -o $@ $(SHAREDLIBPATH) -L$(PRODUCT_LIBHOME) -L$(LIBHOME) LINK macro redefined by Oracle from $(LDCCOM) to cc $(LDFLAGS) Deleted PERL definition: PERL=perl Deleting ORA_NLS = $(ORACLE_HOME)/ocommon/nls/admin/data/ because it is not already set in the environment and it can cause ORA-01019 errors. Deleted ORA_NLS definition: ORA_NLS = $(ORACLE_HOME)/ocommon/nls/admin/data/ Deleting ORA_NLS33 = $(ORACLE_HOME)/ocommon/nls/admin/data/ because it is not already set in the environment and it can cause ORA-01019 errors. Deleted ORA_NLS33 definition: ORA_NLS33 = $(ORACLE_HOME)/ocommon/nls/admin/data/ Deleted SHELL definition: SHELL=/bin/sh Deleted LIB_EXT definition: LIB_EXT=a Deleted OBJ_EXT
Re: Auto increment - return value
Not on the ones I have used. Normally (well my normal anyway) you have to extract it from elsewhere. For example, Sybase SQL anywhere you need select @@identity executed immediately afterwards. One other way is to put the insert a stored procedure and return the auto-increment value. However it IS database dependent. From: T.P.Afamdi Okeke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 09 May, 2001 01:31 PM If you perform an insert on a table with an auto-increment field, does DBI return the auto increment value of the row that was just inserted?
Re: executing atomic transactions in DBI
I could go along with a 'finish() called on a completed query' complaint, but I've left code behind at client sites that uses $sth-finish() and is unlikely to be updated or reviewed anytime in the foreseeable future. -- Mac :}) ** I normally forward private database questions to the DBI mail lists. ** Give a hobbit a fish and he'll eat fish for a day. Give a hobbit a ring and he'll eat fish for an age. - Original Message - From: Tim Bunce [EMAIL PROTECTED] To: Peter J. Schoenster [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 04:42 Subject: Re: executing atomic transactions in DBI On Fri, May 04, 2001 at 04:49:59PM -0600, Peter J. Schoenster wrote: eval { my $sql = qq|INSERT INTO company_profile (company_description,company_name,culture,employees,employer _id,growth_rate,leadership,mission,sec_fillings_url,type,url,year) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)|; my @vals = qw(sadfds 007_company_name sadfsadfsa 500 47 91-100% sadfsad afsadf sdfdsa established sadfsadf 1965); my $sth; $sth= $dbh-prepare($sql); $sth-execute(@vals); $sql = qq|UPDATE users set username = 'NOT' where f_id = ?|; $sth= $dbh-prepare($sql); $sth-execute('49'); $sth-finish(); $dbh-commit; }; Out in the unix world there's a Useless use of the cat command award. I should probably invent one for Useless use of the finish method. Ho hum. Meanwhile, maybe the next release of the DBI will rename finish() to cancel_select() and deprecate finish(). Tim.
RE: executing atomic transactions in DBI
Now as I read it a few times, I can make sense out of it. Just a long day yersterday. Although it can be a little bit more clearly explained for challenged people like myself:-) I guess maybe reverse thinking... *** If `PrintError' is also on, then it will be skipped since the 'die' will print the message, unless '__DIE__' handler is defined in which case 'PrintError' is done before 'RaiseError'. *** Sounds like the same thing, but when reading for the first time can make more sense, since in most cases '__DIE__' is probably not defined, so that condition is more commone and should come first. Anyone?? Ilya Sterin -Original Message- From: Tim Bunce To: Sterin, Ilya Cc: 'Tim Bunce '; '''Neil Lunn ' ' '; [EMAIL PROTECTED]' ' ' ' Sent: 05/09/2001 6:00 AM Subject: Re: executing atomic transactions in DBI On Tue, May 08, 2001 at 11:06:58AM -0600, Sterin, Ilya wrote: In the docs shouldn't this be changed... *** If `PrintError' is also on, then the `PrintError' is done before the `RaiseError' *** to *** If `PrintError' is also on, then the `PrintError' is done before the `RaiseError' though 'RaiseError' will override 'PrintError' and the error will be printed as die() rather than warn(). *** Or something like that... Err, why, exactly? Tim.
RE: (Fwd) Please help
For DBI to work you must install DBI and then DBD drivers of your need. Looks like you are using DBD::Proxy and it tells you that all the DBD::Proxy requires have not been installed. Look at the Readme file for DBD::Proxy to see what other modules need to be installed for it to work properly. Ilya Sterin -Original Message- From: Tim Bunce To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: 05/09/2001 5:41 AM Subject: (Fwd) Please help - Forwarded message from Paul.Pslee [EMAIL PROTECTED] - From: Paul.Pslee [EMAIL PROTECTED] To: Tim.Bunce [EMAIL PROTECTED] Subject: Please help Date: Wed, 9 May 2001 12:35:15 +0800 X-SMTP-HELO: mail1.maxis.net.my X-SMTP-MAIL-FROM: [EMAIL PROTECTED] X-SMTP-RCPT-TO: [EMAIL PROTECTED] X-SMTP-PEER-INFO: leo.netmind.com [172.16.1.115] Mr Tim, Do u know what i missing ? I install DBI-1.15.tar.gz already but this below but cannot compile. Thanks in advance PS.lee install_driver(Proxy) failed: Can't locate RPC/PlClient.pm in @INC (@INC contains: /usr/local/lib/perl5/5.00503/sun4-solaris /usr/local/lib/perl5/5.00503 /usr/local/lib/perl5/site_perl/5.005/sun4-solaris /usr/local/lib/perl5/site_perl/5.005 .) at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/Proxy.pm line 28. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/DBD/Proxy.pm line 28. Perhaps a module that DBD::Proxy requires hasn't been fully installed at connect_sql.1.pl line 9 - End forwarded message -
RE: (Fwd) Oracle DBD
Make sure your ORACLE_HOME and LD_LIBRARY_PATH are correctly set for the username you are running the script with and also for the username that the server will be executing the script with, which is usually 'nobody'. Ilya Sterin -Original Message- From: Tim Bunce To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: 05/09/2001 6:01 AM Subject: (Fwd) Oracle DBD - Forwarded message from Joe Zimmerlin [EMAIL PROTECTED] - Date: Tue, 08 May 2001 14:02:15 -0400 From: Joe Zimmerlin [EMAIL PROTECTED] Organization: Parabon Computation, Inc. X-Accept-Language: en To: [EMAIL PROTECTED] Subject: Oracle DBD Sorry about that last email, I'm running Linux Netscape and it seems to like BASE64 more than anything else... Hello Tim, my name is Joe Zimmerlin and I am one of the millions of developers using DBI with Oracle. I am sure you are pretty busy handling loads of question pertaining to the DBI and DBD::Oracle modules, but I will attempt to get my question in the queue here... I am using DBD::Oracle on an Intel Solaris (2.7) machine running Oracle 8.1.6 standard edition. I have used DBI and DBD::Oracle in PERL CGIs with this setup numerous times before without any problems. However, I have found that, on this particular setup (not sure what is different about this Solaris/Oracle installation), I repeatedly get: install_driver(Oracle) failed: Can't load '/usr/local/lib/perl5/site_perl/5.6.0/i86pc-solaris/auto/DBD/Oracle/Orac le.so' for module DBD::Oracle: ld.so.1: /usr/local/bin/perl: fatal: libclntsh.so.8.0: open failed: No such file or directory at /usr/local/lib/perl5/5.6.0/i86pc-solaris/DynaLoader.pm line 200. at (eval 19) line 3 Compilation failed in require at (eval 19) line 3. Perhaps a required shared library or dll isn't installed where expected at /opt/parabon/frontier-enterprise-1.4.0.4/apache/cgi-bin/clientTaskQ.cgi line 219 This appears in the Apache error log upon invocation of this CGI. The CGI doesn't even use DBI until a following POST, but for some reason, it looks like when it tries to load something having to do with DBI, it gives the above message. Have you seen anything like this before? It sorta looks like an Oracle shared object isn't in place. However, I tried reinstalling Oracle from scratch, using my usual procedure which usually works, and I am getting the same results. I am very confused... Another interesting observation - when I run this same PERL CGI from the command-line, it just dumps core and goes away without any kind of diagnostic message, which makes me think even more that it is likely PERL trying to load something. Anyways, any help would be greatly appreciated. If any of this stuff looks familiar, please let me know. Otherwise, I'll let you know what I find upon further investigation... Thanks, Joe Zimmerlin Software Engineer Parabon Computation, Inc. [EMAIL PROTECTED] - End forwarded message -
RE: Auto increment - return value
Actually with DBD::Mysql you can use $sth-{insertid}; with the statement handle to get the last autoincrement value. Ilya Sterin -Original Message- From: Paul Cotter To: [EMAIL PROTECTED] Sent: 05/09/2001 8:20 AM Subject: Re: Auto increment - return value Not on the ones I have used. Normally (well my normal anyway) you have to extract it from elsewhere. For example, Sybase SQL anywhere you need select @@identity executed immediately afterwards. One other way is to put the insert a stored procedure and return the auto-increment value. However it IS database dependent. From: T.P.Afamdi Okeke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 09 May, 2001 01:31 PM If you perform an insert on a table with an auto-increment field, does DBI return the auto increment value of the row that was just inserted?
Re: make DBI problems
Ray, I did remove everything and sart all over, this is what I am having as errors now. Lamine Diatta lamine-[root] /PERL-DBI: lamine-[root] /PERL-DBI: lamine-[root] /PERL-DBI: lamine-[root] /PERL-DBI: ls dbi-1.15.tar lamine-[root] /PERL-DBI: lamine-[root] /PERL-DBI: lamine-[root] /PERL-DBI: tar xvf dbi-1.15.tar drwxr-xr-x 300/10 0 Mar 30 09:57 2001 DBI-1.15/ drwxr-xr-x 300/10 0 Mar 30 09:57 2001 DBI-1.15/lib/ drwxr-xr-x 300/10 0 Mar 30 09:57 2001 DBI-1.15/lib/DBD/ -r--r--r-- 300/109222 Mar 30 09:35 2001 DBI-1.15/lib/DBD/ExampleP.pm -r--r--r-- 300/10 21187 Mar 27 18:46 2001 DBI-1.15/lib/DBD/Proxy.pm -r--r--r-- 300/102699 Jun 18 05:08 1999 DBI-1.15/lib/DBD/NullP.pm -r--r--r-- 300/104173 Mar 30 09:35 2001 DBI-1.15/lib/DBD/Sponge.pm -r--r--r-- 300/105157 Jul 28 20:11 1999 DBI-1.15/lib/DBD/Multiplex.pm -r--r--r-- 300/10 40792 Mar 30 09:35 2001 DBI-1.15/lib/DBD/ADO.pm drwxr-xr-x 300/10 0 Mar 30 09:57 2001 DBI-1.15/lib/DBI/ -r-xr-xr-x 300/10 29069 Mar 30 09:35 2001 DBI-1.15/lib/DBI/Shell.pm -r--r--r-- 300/10 36598 Mar 28 09:52 2001 DBI-1.15/lib/DBI/FAQ.pm -r--r--r-- 300/10 17125 Mar 30 07:56 2001 DBI-1.15/lib/DBI/ProxyServer.pm -r--r--r-- 300/10 56967 Jun 10 20:06 2000 DBI-1.15/lib/DBI/DBD.pm -r--r--r-- 300/104594 May 6 14:11 1999 DBI-1.15/lib/DBI/W32ODBC.pm -r--r--r-- 300/10 11484 Mar 30 09:35 2001 DBI-1.15/lib/DBI/Format.pm drwxr-xr-x 300/10 0 Mar 30 09:57 2001 DBI-1.15/lib/Bundle/ -r--r--r-- 300/101138 Jul 5 07:12 1999 DBI-1.15/lib/Bundle/DBI.pm drwxr-xr-x 300/10 0 Mar 30 09:57 2001 DBI-1.15/lib/Win32/ -r--r--r-- 300/103943 Mar 27 17:41 2001 DBI-1.15/lib/Win32/DBIODBC.pm -r--r--r-- 300/10 78583 Mar 30 09:35 2001 DBI-1.15/DBI.xs drwxr-xr-x 300/10 0 Mar 30 09:57 2001 DBI-1.15/t/ -r--r--r-- 300/10 958 Nov 8 07:43 1998 DBI-1.15/t/meta.t -r-xr-xr-x 300/101610 Jun 10 20:06 2000 DBI-1.15/t/dbidrv.t -r--r--r-- 300/109861 Mar 30 07:20 2001 DBI-1.15/t/examp.t -r--r--r-- 300/101609 Nov 8 07:43 1998 DBI-1.15/t/subclass.t -r--r--r-- 300/10 10282 Mar 27 18:26 2001 DBI-1.15/t/proxy.t -r-xr-xr-x 300/101919 Jun 10 18:12 1999 DBI-1.15/t/basics.t -r--r--r-- 300/10 632 Jun 10 22:27 2000 DBI-1.15/t/shell.t -r--r--r-- 300/10 394 Jan 3 07:59 1999 DBI-1.15/Perl.xs -r--r--r-- 300/10 16577 Mar 30 09:35 2001 DBI-1.15/DBIXS.h -r--r--r-- 300/101775 Jun 10 22:27 2000 DBI-1.15/MANIFEST -r--r--r-- 300/10 11989 Jun 10 22:27 2000 DBI-1.15/Driver.xst -r--r--r-- 300/10 29738 Mar 30 09:34 2001 DBI-1.15/Changes -r--r--r-- 300/107795 Jun 10 22:27 2000 DBI-1.15/dbipport.h -r-xr-xr-x 300/106886 Mar 28 09:52 2001 DBI-1.15/Makefile.PL -r-xr-xr-x 300/103663 Mar 30 09:35 2001 DBI-1.15/test.pl -r--r--r-- 300/104966 Feb 23 10:34 2001 DBI-1.15/README -r--r--r-- 300/102050 Nov 24 17:53 1998 DBI-1.15/dbd_xsh.h -r--r--r-- 300/10 741 Nov 8 07:43 1998 DBI-1.15/dbish.PL -r--r--r-- 300/101570 Jun 10 20:06 2000 DBI-1.15/dbi_sql.h -r--r--r-- 300/107741 Aug 19 16:14 2000 DBI-1.15/ToDo -r--r--r-- 300/10 146248 Mar 30 09:35 2001 DBI-1.15/DBI.pm -r--r--r-- 300/105578 May 14 20:43 1999 DBI-1.15/dbiproxy.PL lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15:perl Makefile.PL *** Note: The optional PlRPC-modules (RPC::PlServer etc) are not installed. If you want to use the DBD::Proxy driver and DBI::ProxyServer modules, then you'll need to install the RPC::PlServer, RPC::PlClient, Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you. You can install them any time after installing the DBI. You do *not* need these modules for typical DBI usage. Optional modules are available from any CPAN mirror, in particular http://www.perl.com/CPAN/modules/by-module http://www.perl.org/CPAN/modules/by-module ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module Checking if your kit is complete... Looks good Writing Makefile for DBI Remember to actually *read* the README file! Use 'make' to build the software (dmake or nmake on Windows). Then 'make test' to execute self tests. Then 'make install' to install the DBI and then delete this working directory before unpacking and building any DBD::* drivers. lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15: lamine-[root] /PERL-DBI/DBI-1.15:/usr/xpg4/bin/make mkdir blib mkdir blib/lib mkdir blib/arch mkdir blib/arch/auto mkdir blib/arch/auto/DBI mkdir blib/lib/auto mkdir blib/lib/auto/DBI mkdir blib/man1 mkdir blib/man3 cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm cp lib/DBI/Shell.pm blib/lib/DBI/Shell.pm cp
Problem with DBI and Access newbie
Hello I am running a Perl script that is supposed to added a record to an MS Access database using the DBI module. I am testing the script using MS PWS on a Windows 2000 os with Activestate Perl 626. Input into the script comes from parsed form informtion, which is working successfully. When I run the script it appears to complete successfully. That is it doesn't return any script syntax or DBI error messages. But when I check the database the record has not been added. The database contains a single table with 4 columns: Respondent RespIdAutonumber england Text relativity Text lotr Text Below is a copy of the script: sub UpdateDatabase(){ use DBI; $DSN = Survey Results $myDb = DBI-connect('dbi:ODBC:Survey Results'); #Error trapping for invalid connection if (! $myDb){ print Failed to Connect $DSN\n; #end program as processing aborted die; } #Setup Variables for loading table data $england = $PostInputs{ 'england'}; $relativity = $PostInputs{ 'relativity'}; $lotr = $PostInputs{ 'lotr'}; $SQL = qq|INSERT INTO Respondent (england, relativity, lotr) VALUES = ( '$england', '$relativity', '$lotr')|; $sth = $dbh-prepare($SQL); $sth- execute|| die Could not execute SQL statement; $myDb-Close(); } Can anyone please tell me where I am going wrong. Why is this failing to update the database? Thank you in anticipation. P.S. I have just order a copy of Programming the Perl DBI But I need an answer to this problem ASAP please Cheers :-) Trevor
Sybase: execute() fails/error handler
hi, this is an update to my previous post in this regard. I set a custom error handler via $dbHandle-{syb_err_handler} = \syb_err_handler and it is not being called when the reported error occurs. i've tried to generate an error with a wrong query and the handler was called as well as the err, errstr were filled with appropriate messages. i'm sort of stuck at this point don't know where the problem resides yet :-( has anyone encountered same problem? tia, ovidiu
Re: DBD:Sybase and $sth-{SCALE}
From: Michael Peppler [EMAIL PROTECTED] To: David Sevier [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: DBD:Sybase and $sth-{SCALE} Date: Mon, 7 May 2001 14:24:36 -0700 (PDT) David Sevier writes: When done using DBD:ODBC through the proxy, it works fine. But with DBD:Sybase, the metadata returned for items of type Float are a problem. They always come back with a Pecision of 8 and a Scale that is empty (null). A Float doesn't have any scale, and precision in this case is the number of bytes used (float is 8, real is 4). 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] Ah! That makes sense. The next question then, is how do I get a scale out of it? In SQL Server, one field (a $ amount field) is showing up as Decimal with Precision 8 and Scale 2. With DBD:ODBC through DBIProxy, I get that as the output for the metadata. With DBD:Sybase, however, I get the Float with Precision 8 and no Scale. What do I need to do to get the scale for the field if floats don't have scale? Thanks, David Sevier _ Get your FREE download of MSN Explorer at http://explorer.msn.com
dbish questions
There's a couple of things I'm having a proble with when trying to use dbish. First, I want to turn autocommit off. So, according to the perldoc on DBI::Shell, I'm supposed to type /option autocommit=0, but when I do I get the message: Unknown or ambiguous option name 'autocommit' I do see an init_autocommit, but I'm unsure if that does what I think it would since it is not documented in the Perldoc. Second, I was trying to specify the database in the driver... dbi:Sybase:server=;database= username passwd This doesn't appear to work, however, dbi:Sybase:server= does work. Is this a bug or is this intentional? It's asking for a DSN and according to the documentation on DBD::Sybase, I am in both cases feeding it a valid DSN. Thank you, Curt Crandall
DBD:Oracle memory leak
hi, i posted a few weeks ago, and didn't get an answer, so i'm trying again. i assume that if i'm seeing this problem, then someone else must be as well. there was a memory leak in DBD::Oracle 1.2 (i'm pretty sure it was 1.2) that came about on connect/disconnect. it was a running thread, and someone mailed me a patch, (that worked), and then it was incorporated into 1.3. i am now running the following configuration: solaris 7 DBI 1.14 DBD::Oracle 1.6 Summary of my perl5 (5.0 patchlevel 5 subversion 2) Oracle 8.1.7 and the problem is back. my application runs forever as a daemon, and connects and disconnects all the time. the memory leak last time was on the order of 32k each connect, something like that, so the processes grow to the point that the machine hangs. has anyone else seen this? is there a patch floating around? i can go search the archives for the last one and see if that works. any thoughts? thanks, mickm BayGate, Inc. 539 Bryant St. # 400 San Francisco, CA 94107 Phone: 415.908.3944 Fax: 415.908.3945 www.baygate.com
RE: dbish questions
Try ... $dbh-{AutoCommit} = 0; -Original Message- From: Curt Russell Crandall [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 1:57 PM To: [EMAIL PROTECTED] Subject: dbish questions There's a couple of things I'm having a proble with when trying to use dbish. First, I want to turn autocommit off. So, according to the perldoc on DBI::Shell, I'm supposed to type /option autocommit=0, but when I do I get the message: Unknown or ambiguous option name 'autocommit' I do see an init_autocommit, but I'm unsure if that does what I think it would since it is not documented in the Perldoc. Second, I was trying to specify the database in the driver... dbi:Sybase:server=;database= username passwd This doesn't appear to work, however, dbi:Sybase:server= does work. Is this a bug or is this intentional? It's asking for a DSN and according to the documentation on DBD::Sybase, I am in both cases feeding it a valid DSN. Thank you, Curt Crandall
Oracle stored procedures
I thought I read this in docs somewhere but can't find it: Can Oracle SP's be prepared once and executed multiple times using placeholder values? And, is '?' acceptable as a placeholder? The SP examples I have are all prepare once/execute once and all use the :1 placeholder syntax. 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
RE: dbish questions
I don't think that'll work with dbish. Thanks anyway. On Wed, 9 May 2001, Jones Robert Contr 81 CS/SCK wrote: Try ... $dbh-{AutoCommit} = 0; -Original Message- From: Curt Russell Crandall [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 1:57 PM To: [EMAIL PROTECTED] Subject: dbish questions There's a couple of things I'm having a proble with when trying to use dbish. First, I want to turn autocommit off. So, according to the perldoc on DBI::Shell, I'm supposed to type /option autocommit=0, but when I do I get the message: Unknown or ambiguous option name 'autocommit' I do see an init_autocommit, but I'm unsure if that does what I think it would since it is not documented in the Perldoc. Second, I was trying to specify the database in the driver... dbi:Sybase:server=;database= username passwd This doesn't appear to work, however, dbi:Sybase:server= does work. Is this a bug or is this intentional? It's asking for a DSN and according to the documentation on DBD::Sybase, I am in both cases feeding it a valid DSN. Thank you, Curt Crandall
RE: Sybase: execute() fails without a die or errstr being set
You are right. I looked into httpd error log and found the ct_cmd_alloc failed entries. Regarding the memory availability server has 512Mb Ram and I limited the number of httpd childs to 20 (noticed that 20-22Mb is the largest per child) I'll try to decrease/tune the MaxClients value to see if this helps. Thanks! for spotting that it gives me a track to pursue ... Ovidiu -Original Message- From: Michael Peppler [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 3:51 PM To: Dimulescu, Ovidiu Cc: '[EMAIL PROTECTED]' Subject: Re: Sybase: execute() fails without a die or errstr being set Dimulescu, Ovidiu writes: Hi all, The problem appears to be that the ct_cmd_alloc() call fails: - execute for DBD::Sybase::st (DBI::st=HASH(0x1c69cbc)~0x1c59c44) syb_st_execute() - ct_command() failed (cmd=0, statement=SELECT ClientEmail From Domains Where DoaminName='test008.net', imp_sth=123dd18) Note that cmd==0 above, and cmd should be the address of the CS_COMMAND structure. So syb_alloc_cmd() failed right before that - you should have an entry in the httpd error log with ct_cmd_alloc failed) That is of course not very helpful, but the OpenClient manual states that ct_cmd_alloc() fails if there isn't enough memory (but doesn't specify any other failure reasons). How is the memory availability for your mod_perl processes? 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] NOTICE This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Any opinions expressed in this email are those of the individual and not necessarily those of Website Pros, Inc. All liability for viruses is excluded to the fullest extent permitted by law.
Re: executing atomic transactions in DBI
On Wed, May 09, 2001 at 08:42:40AM -0600, Sterin, Ilya wrote: Now as I read it a few times, I can make sense out of it. Just a long day yersterday. Although it can be a little bit more clearly explained for challenged people like myself:-) I guess maybe reverse thinking... *** If `PrintError' is also on, then it will be skipped since the 'die' will print the message, unless '__DIE__' handler is defined in which case 'PrintError' is done before 'RaiseError'. *** Sounds like the same thing, but when reading for the first time can make more sense, since in most cases '__DIE__' is probably not defined, so that condition is more commone and should come first. Anyone?? Umm, first I changed it to say: : If you turn CRaiseError on then you'd normally turn CPrintError off. : If CPrintError is also on, then the CPrintError is skipped if the DBI : thinks the exception about to be trigged by CRaiseError will not be : caught. (Currently the DBI only considers a C$SIG{__DIE__} hook : and catching an exception. That'll be fixed one day to include eval.) but now I've changed it to say: : If you turn CRaiseError on then you'd normally turn CPrintError off. : If CPrintError is also on, then the CPrintError is done first (naturally). In other words, I've removed the trying-to-be-too-clever logic. If you ask for both PrintError and RaiseError then that's what you get. :) Tim.
RE: Oracle memory leak
I had the same problem running the following version. # perl -v This is perl, version 5.005_03 built for sun4-solaris Solaris 2.6 Thu Jan 13 17:22:49 2000: Module the DBI manpage o installed into: /apps/perl/lib/site_perl/5.005 o LINKTYPE: dynamic o VERSION: 1.13 o EXE_FILES: dbish dbiproxy Thu Jan 13 17:36:26 2000: Module the DBD::Oracle manpage o installed into: /apps/perl/lib/site_perl/5.005 o LINKTYPE: dynamic o VERSION: 1.03 o EXE_FILES: ora_explain However, according to Tim this is a Perl problem. I tried the workaround suggested bellow w/out success. On Fri, Mar 30, 2001 at 10:02:14AM -0500, Ondercin, Boris wrote: Is the workaround setting $dbh-{RaiseError}=0 ? Don't use local() on handle attribute. Reset the attribute value explicitly at the end of the block and in any exception handlers that may catch exceptions thrown from within the block (which would thereforce miss your explicit resetting of the attribue). Tim. -Original Message- From: Tim Bunce [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 9:40 AM To: [EMAIL PROTECTED] Subject: Memory leak on local($dbh-{RaiseError})=1 is a perl bug Here's a copy of a bug report I just sent to perl5-porters. FTI, DBI 1.15 will be released shortly :) Tim. - Forwarded message from Tim Bunce [EMAIL PROTECTED] - Date: Fri, 30 Mar 2001 15:38:27 +0100 From: Tim Bunce [EMAIL PROTECTED] To: Perl 5 porters [EMAIL PROTECTED] Cc: Tim Bunce [EMAIL PROTECTED] Subject: Memory leak localizing a tied variable The script appended below demonstrates a memory leak when doing a local() on a tied variable. I found this because someone reported that local($dbh-{RaiseError})=1 (and similar) leaked memory and thought it maybe a DBI bug. The script demonstrates that it's not. Perl 5.005 and 5.006 leak but 5.004 doesn't. I've not got a 5.7.0 handy. I'd be grateful if someone could test it on the current bleadperl. Thanks. Tim. #!/usr/local/bin/perl -w print localizing tied variable leak test for perl $]...\n; # 5.006 does leak # 5.00503 does leak # 5.00404 doesn't leak use strict; use Tie::Hash; tie my %tie_hash = 'Tie::StdHash'; my $count = 0; my $ps = (-d '/proc') ? ps -lp : ps -l; mem_test() while 1; sub mem_test { system(echo $count; $ps$$) if (($count++ % 1000) == 0); local($tie_hash{Foo}) = 1; } - End forwarded message - -Original Message- From: Mickey Mestel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 3:59 PM To: Dbi-Users@Perl. Org Subject: DBD:Oracle memory leak hi, i posted a few weeks ago, and didn't get an answer, so i'm trying again. i assume that if i'm seeing this problem, then someone else must be as well. there was a memory leak in DBD::Oracle 1.2 (i'm pretty sure it was 1.2) that came about on connect/disconnect. it was a running thread, and someone mailed me a patch, (that worked), and then it was incorporated into 1.3. i am now running the following configuration: solaris 7 DBI 1.14 DBD::Oracle 1.6 Summary of my perl5 (5.0 patchlevel 5 subversion 2) Oracle 8.1.7 and the problem is back. my application runs forever as a daemon, and connects and disconnects all the time. the memory leak last time was on the order of 32k each connect, something like that, so the processes grow to the point that the machine hangs. has anyone else seen this? is there a patch floating around? i can go search the archives for the last one and see if that works. any thoughts? thanks, mickm BayGate, Inc. 539 Bryant St. # 400 San Francisco, CA 94107 Phone: 415.908.3944 Fax: 415.908.3945 www.baygate.com
What's the best DBI/Data combination?
Anybody care to give their thoughts on what the best/most stable DBI/Data combination is? Will it be MySQL, mSQL, Sybase, PostgreSQL, or what? I'm looking for a combination that will provide reliable performance and also give features such as linking to other data or something such as... TIA Phillip
Re: What's the best DBI/Data combination?
At 5:34 PM -0400 5/9/01, Phillip Perkins wrote: Anybody care to give their thoughts on what the best/most stable DBI/Data combination is? Will it be MySQL, mSQL, Sybase, PostgreSQL, or what? I'm looking for a combination that will provide reliable performance and also give features such as linking to other data or something such as... All the databases you mentioned bind to DBI in a perfectly satisfactory manner. A much more significant question is which database to use. This mailing list is not the place for the inevitable religious war between adherents of Mysql versus Postgres. There are many other places on the Net where people can argue endlessly about transactions, triggers, subqueries, referential integrity, performance, reliability, and so on. Just not here please.
Re: dbish questions
The AutoCommit is an over-site that I need to fix. You may /opt init_autocommit=0, but it doesn't turn autocommit off. It just sets the value to 0. For now, use the dbi:Sybase(AutoCommit=0):... perldoc DBI You can also define connection attribute values within the $data_source parameter. For example: dbi:DriverName(PrintError=0,Taint=1):... dbi:Sybase:server=;database= username passwd Put quotes around dbi:Sybase...;... If you're using Linux/Unix, the semi-colon is interpreted as a command separator. I've applied for a PAUSE id. Hopefully I'll have a new DBI::Shell release soon. Tom On Wed, May 09, 2001 at 04:09:52PM -0400, Curt Russell Crandall wrote: I don't think that'll work with dbish. Thanks anyway. On Wed, 9 May 2001, Jones Robert Contr 81 CS/SCK wrote: $dbh-{AutoCommit} = 0; -Original Message- From: Curt Russell Crandall [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 1:57 PM To: [EMAIL PROTECTED] Subject: dbish questions There's a couple of things I'm having a proble with when trying to use dbish. First, I want to turn autocommit off. So, according to the perldoc on DBI::Shell, I'm supposed to type /option autocommit=0, but when I do I get the message: Unknown or ambiguous option name 'autocommit' I do see an init_autocommit, but I'm unsure if that does what I think it would since it is not documented in the Perldoc. Second, I was trying to specify the database in the driver... dbi:Sybase:server=;database= username passwd This doesn't appear to work, however, dbi:Sybase:server= does work. Is this a bug or is this intentional? It's asking for a DSN and according to the documentation on DBD::Sybase, I am in both cases feeding it a valid DSN. -- Thomas A. Lowery See DBI/FAQ http://tlowery.hypermart.net _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
RE: (Fwd) Oraperl Binary for Windows
Thanks a lot for that 3 * 10 ** 8 m/sec response :) , we dont see a binary version for DBI and DBD ..are they available.? or should we have C compiler and have to compile it.. -- Forwarded by Mahesh L Velapakam on 05/09/2001 01:08 PM --- Sterin, Ilya [EMAIL PROTECTED] on 05/09/2001 12:48:12 PM To: '[EMAIL PROTECTED] ' [EMAIL PROTECTED] cc: '[EMAIL PROTECTED] ' [EMAIL PROTECTED] Subject: RE: (Fwd) Oraperl Binary for Windows Oraperl is depricated interface. Use DBI and DBD::Oracle. You can download and install from activestate. You must have ActiveState Perl installed. Then use the ppm utility to install. See docs for instructions. Ilya Sterin -Original Message- From: Tim Bunce To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: 05/09/2001 1:40 PM Subject: (Fwd) Oraperl Binary for Windows - Forwarded message from [EMAIL PROTECTED] - From: [EMAIL PROTECTED] () X-Server-Uuid: 1569d162-b3be-4edd-8d78-ab9187b54f11 Subject: Oraperl Binary for Windows To: [EMAIL PROTECTED] Date: Wed, 9 May 2001 11:50:43 -0700 X-MIMETrack: Serialize by Router on SV-GW1/Seagate Internet(Release 5.0.6a |January 17, 2001) at 05/09/2001 11:48:47 AM X-WSS-ID: 16E74E9A1108974-01-01 Hi Tim, Where can I find Oraperl Binary for Windows 32? pls..help.. Thanks - End forwarded message -
Oracle CLOBs through DBI through CGI.pm don't work?
DBI v1.14, DBD::Oracle v1.06 All, I have a module containing methods I use all the time on IRIX and Win32 boxes to pull data stored in CLOB fields from a table stored on a Solaris DB machine. For the first time today I tried using this SAME method in a perl CGI script and got nothing back. No errors, not a whisper of complaint from Oracle. Just silence and no data. Has anyone run into this problem before? It seems to be JUST within perl CGI scripts. Here's the relevant portion of the subroutine: my $sql =E_SQL_E; SELECT sequence FROM Clone WHERE isolate_id = $params{-id} E_SQL_E my $sth = $dbh-prepare($sql) or confess $DBI::errstr; $sth-{LongReadLen} = 2**16-2; $sth-{LongTruncOk} = 0; $sth-execute() or confess $DBI::errstr; my ($seq) = $sth-fetchrow_array(); return $seq; $seq is returned as undef ... and $DBI::errstr is always empty! Advice appreciated ... - jc - James Diggans Phone:301.987.1756 Gene Logic, Inc. FAX: 301.987.1701 [EMAIL PROTECTED] Cell: 301.908.2477 - The information contained in this email message is intended only for the personal use of the recipient(s) named above. This message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review,dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by email, and delete the original message.
Re: (Fwd) Oraperl Binary for Windows
Try this/You can find all these drivers and dbd's in Activestate.com C:\ppm PPM interactive shell (2.1.2) - type 'help' for available commands. PPM search DBD Packages available from http://ppm.ActiveState.com/cgibin/PPM/ppmserver.pl?urn: PPMServer: DBD-CSV [0.1025] DBI driver for CSV files DBD-DB2 [0.75 ] Perl driver for IBM DB2 Universal Database DBD-JDBC [0.63 ] JDBC proxy driver for the DBI module DBD-Mysql[1.2200] DBI driver for Mysql datasources DBD-ODBC [0.28 ] ODBC driver for the DBI module. DBD-Oracle [1.06 ] Oracle database driver for the DBI module DBD-Oracle8 [1.06 ] Oracle 8 database driver for the DBI module DBD-Ovrimos [0.12 ] DBI Driver for Ovrimos (formerly Altera SQL Server) DBD-RAM [0.072 ] a DBI driver for files and data structures DBD-Recall [1.8 ] Database fault tolerance through replication. DBD-SQLrelay [0.1 ] perl DBI driver for SQL Relay DBD-Sprite [0.13 ] Modified version of Sprite to manipulate text delimited DBD-Sybase [0.91 ] DBI driver for Sybase datasources DBD-XBase[0.161 ] Perl module for reading and writing the dbf files DBIx-AnyDBD [1.98 ] DBD independant class PPM search DBI Packages available from http://ppm.ActiveState.com/cgibin/PPM/ppmserver.pl?urn: PPMServer: Apache-DBILogin[1.6 ] authenticates via a DBI connection ApacheDBI [0.88 ] Authentication and Authorization via Perl's DBI DBI[1.14 ] Database independent interface for Perl DBIx-AnyDBD[1.98 ] DBD independant class DBIx-CGI [0.06 ] Easy to Use DBI interface for CGI scripts DBIx-CGITables [0.001] Easy DB access from a CGI DBIx-Copy [0.02 ] For copying database content from one db to another DBIx-DataSource[0.02 ] Database-independant create and drop functions DBIx-Easy [0.10 ] Easy to Use DBI interface DBIx-Formatter [0.01 ] Module to perform report generation via query DBI DBIx-MSSQLReporter [1.00 ] An module to connect Perl to MS SQL Server and MS DBIx-Password [1.6 ] Allows you to create a global password file for DB DBIx-Profile [1] DBI query profiler DBIx-SearchBuilder [0.21 ] Perl extension for easy SQL SELECT Statement DBIx-Table [0.03 ] Class used to represent DBI database tables. DBIx-XMLMessage[0.03 ] XML Message exchange between DBI data sources DBIx-XML_RDB [0.05 ] Perl extension for creating XML from existing DBI Persistent-DBI [0.50 ] An Abstract Persistent Class implemented using a DBI PPM install - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 1:13 PM Subject: RE: (Fwd) Oraperl Binary for Windows Thanks a lot for that 3 * 10 ** 8 m/sec response :) , we dont see a binary version for DBI and DBD ..are they available.? or should we have C compiler and have to compile it.. -- Forwarded by Mahesh L Velapakam on 05/09/2001 01:08 PM --- Sterin, Ilya [EMAIL PROTECTED] on 05/09/2001 12:48:12 PM To: '[EMAIL PROTECTED] ' [EMAIL PROTECTED] cc: '[EMAIL PROTECTED] ' [EMAIL PROTECTED] Subject: RE: (Fwd) Oraperl Binary for Windows Oraperl is depricated interface. Use DBI and DBD::Oracle. You can download and install from activestate. You must have ActiveState Perl installed. Then use the ppm utility to install. See docs for instructions. Ilya Sterin -Original Message- From: Tim Bunce To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: 05/09/2001 1:40 PM Subject: (Fwd) Oraperl Binary for Windows - Forwarded message from [EMAIL PROTECTED] - From: [EMAIL PROTECTED] () X-Server-Uuid: 1569d162-b3be-4edd-8d78-ab9187b54f11 Subject: Oraperl Binary for Windows To: [EMAIL PROTECTED] Date: Wed, 9 May 2001 11:50:43 -0700 X-MIMETrack: Serialize by Router on SV-GW1/Seagate Internet(Release 5.0.6a |January 17, 2001) at 05/09/2001 11:48:47 AM X-WSS-ID: 16E74E9A1108974-01-01 Hi Tim, Where can I find Oraperl Binary for Windows 32? pls..help.. Thanks - End forwarded message -
RE: executing atomic transactions in DBI
-Original Message- From: Tim Bunce [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 7:07 AM To: Sterin, Ilya Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: executing atomic transactions in DBI but now I've changed it to say: : If you turn CRaiseError on then you'd normally turn CPrintError off. I like that, it's an important statement to make. : If CPrintError is also on, then the CPrintError is done first (naturally). In other words, I've removed the trying-to-be-too-clever logic. If you ask for both PrintError and RaiseError then that's what you get. As long and the words 'warn' and 'die' are listed in the documentation I agree that this should be very clear. Umm. Does that just mean in the docs or : -if (!raise_error || (diehook SvOK(diehook))) +if (!raise_error) Neil :) Tim. __ 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: Oracle CLOBs through DBI through CGI.pm don't work?
have done this before and have no problems. I will send you the snippet tomorrow if you want. you have to do: use DBD:Oracle(:ora_types); and then say which column is the CLOB. I don't have the syntax in front of me. But will send it off list tomorrow if someone else doesn't answer. Job --- [EMAIL PROTECTED] wrote: DBI v1.14, DBD::Oracle v1.06 All, I have a module containing methods I use all the time on IRIX and Win32 boxes to pull data stored in CLOB fields from a table stored on a Solaris DB machine. For the first time today I tried using this SAME method in a perl CGI script and got nothing back. No errors, not a whisper of complaint from Oracle. Just silence and no data. Has anyone run into this problem before? It seems to be JUST within perl CGI scripts. Here's the relevant portion of the subroutine: my $sql =E_SQL_E; SELECT sequence FROM Clone WHERE isolate_id = $params{-id} E_SQL_E my $sth = $dbh-prepare($sql) or confess $DBI::errstr; $sth-{LongReadLen} = 2**16-2; $sth-{LongTruncOk} = 0; $sth-execute() or confess $DBI::errstr; my ($seq) = $sth-fetchrow_array(); return $seq; $seq is returned as undef ... and $DBI::errstr is always empty! Advice appreciated ... - jc - James Diggans Phone:301.987.1756 Gene Logic, Inc. FAX: 301.987.1701 [EMAIL PROTECTED] Cell: 301.908.2477 - The information contained in this email message is intended only for the personal use of the recipient(s) named above. This message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review,dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by email, and delete the original message. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: ODBC connects, but queries fail.
Jack, Just as an extra check. What do you get if you fully qualify the DSN in the dbi connect string? (that is, a DSN'less connection) ie dbi:ODBC:driver= 'etc' Neil -Original Message- From: Jack McKinney [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 6:12 AM To: [EMAIL PROTECTED] Subject: DBI:ODBC connects, but queries fail. The end result I need is that I need to be able to connect to a MSSQL server on a WinNT box from perl on my linux box. If someone can help me make this happen, I'll buy you lunch (if you aren't in Austin, TX, I'll send you a gift certificate). Here is what I currently have: I have installed unixodbc 2.0.6 and freetds 0.50 on my linux 2.2.17 system. I have created the following entry in /usr/local/etc/odbc.ini: [TEST] Driver=/usr/local/lib/odbc-i02.so Server=mssql.mydomain.com User=myuser Pass=mypass Database=testdb Majorver=4 Minorver=2 ConnectTimeout=30 Trace=Yes TraceFile=/tmp/odbc-mssql If I run 'isql TEST' from the command line (isql is a command line sql interpreter that comes with unixodbc), I am able to issue queries and get correct response from the MSSQL server at mssql.mydomain.com. THIS MEANS THAT MY ODBC IS INSTALLED CORRECTLY! The entry above logs to /tmp/odbc-mssql. If I run the isql command, issue one query, and then exit, this file contains: [Inline TDS Driver][/development/src/odbc/SQLConnect.c][/development/src/o dbc/SQLConnect.c][89]SQL_SUCCESS [Inline TDS Driver][/development/src/odbc/SQLGetInfo.c][/development/src/o dbc/SQLGetInfo.c][12]handle = $0804FA58 [Inline TDS Driver][/development/src/odbc/SQLAllocStmt.c][/development/src /odbc/SQLAllocStmt.c][15]handle = $0804FA58 [Inline TDS Driver][/development/src/odbc/SQLDisconnect.c][/development/sr c/odbc/SQLDisconnect.c][7]handle = $0804FA58 So, I am ready for ODBC for perl. I install ODBC 0.28, and run the following script (the query is the same one I executed from isql): #!/usr/bin/perl use DBI; $query = SELECT acctid,company FROM account; #DBI-trace; $db = DBI-connect(DBI:ODBC:TRACK) or die $DBI::errstr; $h = $db-prepare($query); $h-execute; $save = $count = $h-rows; while($count 0) { @row = $h-fetchrow; $row = join(|,@row); print $row\n; } $h-finish; $db-disconnect; I get the following error: DBD::ODBC::st execute failed: [unixODBC][Driver Manager]Data source name not found, and no default driver specified (SQL-IM002)(DBD: describe/SQLColAttributes/SQL_COLUMN_LENGTH err=-1) at ./test2.pl line 11. DBD::ODBC::db disconnect failed: (DBD: db_disconnect/SQLDisconnect err=-1) at ./test2.pl line 20. It claims that it could not find the DSN. Several points: 1. I removed /tmp/odbc-mssql before running this script. This file is back, which indicates to me that it _is_ finding the DSN. How else would it know where to write the trace? /tmp/odbc-mssql: [Inline TDS Driver][/development/src/odbc/SQLConnect.c][/development/src/o dbc/SQLConnect.c][89]SQL_SUCCESS [Inline TDS Driver][/development/src/odbc/SQLGetInfo.c][/development/src/o dbc/SQLGetInfo.c][12]handle = $08181E28 [Inline TDS Driver][/development/src/odbc/SQLSetConnectOption.c][/developm ent/src/odbc/SQLSetConnectOption.c][10]handle = $08181E28 [Inline TDS Driver][/development/src/odbc/SQLEndTran.c][/development/src/o dbc/SQLEndTran.c][43]SQL_SUCCESS [Inline TDS Driver][/development/src/odbc/SQLSetConnectOption.c][/developm ent/src/odbc/SQLSetConnectOption.c][58]SQL_SUCCESS [Inline TDS Driver][/development/src/odbc/SQLSetConnectOption.c][/developm ent/src/odbc/SQLSetConnectOption.c][10]handle = $08181E28 [Inline TDS Driver][/development/src/odbc/SQLSetConnectOption.c][/developm ent/src/odbc/SQLSetConnectOption.c][58]SQL_SUCCESS [Inline TDS Driver][/development/src/odbc/SQLAllocStmt.c][/development/src /odbc/SQLAllocStmt.c][15]handle = $08181E28 [Inline TDS Driver][/development/src/odbc/SQLDisconnect.c][/development/sr c/odbc/SQLDisconnect.c][7]handle = $08181E28 [Inline TDS Driver][/development/src/odbc/SQLDisconnect.c][/development/sr c/odbc/SQLDisconnect.c][14]SQL_ERROR Active Statements exist. Can not disconnect. 2. If it could not find the DSN, why did the ODBC manager report so many successful lines? 3. If it could not find the DSN, then why did ODBC fail on the handle-execute instead of the DBI-connect? I do check the return of DBI-connect, after all. I have tried many variations including setting ODBCHOME and DBI_DSN in the environment, but always have basically the same problem. -- There is no hook, my friend. Jack McKinney There is only what we do. [EMAIL PROTECTED] -Doc Holiday, Wyatt Earp (1994) http://www.lorentz.com 1024D/D68F2C07 4096g/38AEF076 __ Please Note : Only the intended
RE: Problem with DBI and Access newbie
Missed this before. My eyes hurt! Answer Below. -Original Message- From: Trevor Webster [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 5:03 PM To: [EMAIL PROTECTED] Subject: Problem with DBI and Access newbie Hello I am running a Perl script that is supposed to added a record to an MS Access database using the DBI module. I am testing the script using MS PWS on a Windows 2000 os with Activestate Perl 626. Input into the script comes from parsed form informtion, which is working successfully. When I run the script it appears to complete successfully. That is it doesn't return any script syntax or DBI error messages. But when I check the database the record has not been added. The database contains a single table with 4 columns: Respondent RespIdAutonumber england Text relativity Text lotr Text Below is a copy of the script: sub UpdateDatabase(){ use DBI; $DSN = Survey Results $myDb = DBI-connect('dbi:ODBC:Survey Results'); #Error trapping for invalid connection if (! $myDb){ print Failed to Connect $DSN\n; #end program as processing aborted die; } #Setup Variables for loading table data $england = $PostInputs{ 'england'}; $relativity = $PostInputs{ 'relativity'}; $lotr = $PostInputs{ 'lotr'}; $SQL = qq|INSERT INTO Respondent (england, relativity, lotr) VALUES = ( '$england', '$relativity', '$lotr')|; And theres your problem. '$england' does not interpolate. You want $england and so forth. Or even better: ### $SQL = qq|INSERT INTO Respondent (england, relativity, lotr) VALUES = (?,?,?)|; $sth = $dbh-prepare($SQLQ); eval { while (...) { # loop through each whatever $sth-execute($PostInputs{'england'}, $PostInputs('relativity'}, $PostInPuts{'lotr'} }; }; $dbh-commit; }; if ($@) { warn Transaction aborted because $@; $dbh-rollback; } Not that Acess supports transactions, but it's good practice that you may as well start learning. Besides I couldn't resist. --grin! 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: Oracle stored procedures
'?' placeholders get converted into ':1' style placeholders inside DBD::Oracle, so there should be no reason that they wouldn't work. The examples in DBD-Oracle-1.06/Oracle.ex/ use named placeholders like ':value' because they are easier to keep straight, but they are not required. The statement handles in examples 2, 3, and 4 in Oracle.ex/proc.pl may be executed() as many times as you like after they are prepare()d. -- Mac :}) ** I normally forward private database questions to the DBI mail lists. ** Give a hobbit a fish and he'll eat fish for a day. Give a hobbit a ring and he'll eat fish for an age. - Original Message - From: Steve Sapovits [EMAIL PROTECTED] To: DBI List (E-mail) [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 13:01 Subject: Oracle stored procedures I thought I read this in docs somewhere but can't find it: Can Oracle SP's be prepared once and executed multiple times using placeholder values? And, is '?' acceptable as a placeholder? The SP examples I have are all prepare once/execute once and all use the :1 placeholder syntax.
Re: DBI:ODBC connects, but queries fail.
I don't use ODBC, so I can only make some general observations (###). -- Mac :}) ** I normally forward private database questions to the DBI mail lists. ** Give a hobbit a fish and he'll eat fish for a day. Give a hobbit a ring and he'll eat fish for an age. - Original Message - From: Jack McKinney [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 13:11 Subject: DBI:ODBC connects, but queries fail. I have installed unixodbc 2.0.6 and freetds 0.50 on my linux 2.2.17 system. I have created the following entry in /usr/local/etc/odbc.ini: [TEST] Driver=/usr/local/lib/odbc-i02.so Server=mssql.mydomain.com User=myuser Pass=mypass Database=testdb Majorver=4 Minorver=2 ConnectTimeout=30 Trace=Yes TraceFile=/tmp/odbc-mssql If I run 'isql TEST' from the command line (isql is a command line sql interpreter that comes with unixodbc), I am able to issue queries and get correct response from the MSSQL server at mssql.mydomain.com. THIS MEANS THAT MY ODBC IS INSTALLED CORRECTLY! The entry above logs to /tmp/odbc-mssql. If I run the isql command, issue one query, and then exit, this file contains: [Inline TDS Driver][/development/src/odbc/SQLConnect.c][/development/src/odbc/SQLConnect .c][89]SQL_SUCCESS [Inline TDS Driver][/development/src/odbc/SQLGetInfo.c][/development/src/odbc/SQLGetInfo .c][12]handle = $0804FA58 [Inline TDS Driver][/development/src/odbc/SQLAllocStmt.c][/development/src/odbc/SQLAlloc Stmt.c][15]handle = $0804FA58 [Inline TDS Driver][/development/src/odbc/SQLDisconnect.c][/development/src/odbc/SQLDisc onnect.c][7]handle = $0804FA58 So, I am ready for ODBC for perl. I install ODBC 0.28, and run the following script (the query is the same one I executed from isql): #!/usr/bin/perl ### -w in the #! line is worthwhile ### use strict; # is your friend use DBI; $query = SELECT acctid,company FROM account; #DBI-trace; $db = DBI-connect(DBI:ODBC:TRACK) or die $DBI::errstr; ### You connected to 'TEST' from isql, not 'TRACK'. ### Error checking on connect() is always a good idea, but ### didn't do it for prepare() or execute(). ### Perhaps you should set $db-{RaiseError} = 1; $h = $db-prepare($query); $h-execute; $save = $count = $h-rows; ### The value from $h-rows() is not generally dependable ### until after all rows have been fetched. ### while ( @row = $h-fetchrow_array ) ### # would probably do what you want better. ### If you are fetching large quantities, ### you should look into $h-bind_columns() ### and $h-fetch. while($count 0) { @row = $h-fetchrow; $row = join(|,@row); print $row\n; } $h-finish; ### finish() shouldn't be necessary if you are fetching all rows $db-disconnect; I get the following error: DBD::ODBC::st execute failed: [unixODBC][Driver Manager]Data source name not found, and no default driver specified (SQL-IM002)(DBD: describe/SQLColAttributes/SQL_COLUMN_LENGTH err=-1) at ./test2.pl line 11. DBD::ODBC::db disconnect failed: (DBD: db_disconnect/SQLDisconnect err=-1) at ./test2.pl line 20. It claims that it could not find the DSN. Several points: 1. I removed /tmp/odbc-mssql before running this script. This file is back, which indicates to me that it _is_ finding the DSN. How else would it know where to write the trace? /tmp/odbc-mssql: [Inline TDS Driver][/development/src/odbc/SQLConnect.c][/development/src/odbc/SQLConnect .c][89]SQL_SUCCESS [Inline TDS Driver][/development/src/odbc/SQLGetInfo.c][/development/src/odbc/SQLGetInfo .c][12]handle = $08181E28 [Inline TDS Driver][/development/src/odbc/SQLSetConnectOption.c][/development/src/odbc/S QLSetConnectOption.c][10]handle = $08181E28 [Inline TDS Driver][/development/src/odbc/SQLEndTran.c][/development/src/odbc/SQLEndTran .c][43]SQL_SUCCESS [Inline TDS Driver][/development/src/odbc/SQLSetConnectOption.c][/development/src/odbc/S QLSetConnectOption.c][58]SQL_SUCCESS [Inline TDS Driver][/development/src/odbc/SQLSetConnectOption.c][/development/src/odbc/S QLSetConnectOption.c][10]handle = $08181E28 [Inline TDS Driver][/development/src/odbc/SQLSetConnectOption.c][/development/src/odbc/S QLSetConnectOption.c][58]SQL_SUCCESS [Inline TDS Driver][/development/src/odbc/SQLAllocStmt.c][/development/src/odbc/SQLAlloc Stmt.c][15]handle = $08181E28 [Inline TDS Driver][/development/src/odbc/SQLDisconnect.c][/development/src/odbc/SQLDisc onnect.c][7]handle = $08181E28 [Inline TDS Driver][/development/src/odbc/SQLDisconnect.c][/development/src/odbc/SQLDisc onnect.c][14]SQL_ERROR Active Statements exist. Can not disconnect. 2. If it could not find the DSN, why did the ODBC manager report so many successful lines? 3. If it could not find the DSN, then why did ODBC fail on the handle-execute instead of the DBI-connect? I do check the return of DBI-connect, after all. I have tried many variations including setting ODBCHOME and DBI_DSN in the environment, but always have basically the same problem.
RE: Problem with DBI and Access newbie
$SQL = qq|INSERT INTO Respondent (england, relativity, lotr) VALUES = ( '$england', '$relativity', '$lotr')|; And theres your problem. '$england' does not interpolate. You want $england and so forth. $england would interpolate, since it's enclosed in double quotes qq | ... $england = test; print qq/this is just a '$england'/; would print this is just a 'test' Ilya Sterin -Original Message- From: Neil Lunn [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 12:11 AM To: 'Trevor Webster'; [EMAIL PROTECTED] Subject: RE: Problem with DBI and Access newbie Missed this before. My eyes hurt! Answer Below. -Original Message- From: Trevor Webster [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 5:03 PM To: [EMAIL PROTECTED] Subject: Problem with DBI and Access newbie Hello I am running a Perl script that is supposed to added a record to an MS Access database using the DBI module. I am testing the script using MS PWS on a Windows 2000 os with Activestate Perl 626. Input into the script comes from parsed form informtion, which is working successfully. When I run the script it appears to complete successfully. That is it doesn't return any script syntax or DBI error messages. But when I check the database the record has not been added. The database contains a single table with 4 columns: Respondent RespIdAutonumber england Text relativity Text lotr Text Below is a copy of the script: sub UpdateDatabase(){ use DBI; $DSN = Survey Results $myDb = DBI-connect('dbi:ODBC:Survey Results'); #Error trapping for invalid connection if (! $myDb){ print Failed to Connect $DSN\n; #end program as processing aborted die; } #Setup Variables for loading table data $england = $PostInputs{ 'england'}; $relativity = $PostInputs{ 'relativity'}; $lotr = $PostInputs{ 'lotr'}; $SQL = qq|INSERT INTO Respondent (england, relativity, lotr) VALUES = ( '$england', '$relativity', '$lotr')|; And theres your problem. '$england' does not interpolate. You want $england and so forth. Or even better: ### $SQL = qq|INSERT INTO Respondent (england, relativity, lotr) VALUES = (?,?,?)|; $sth = $dbh-prepare($SQLQ); eval { while (...) { # loop through each whatever $sth-execute($PostInputs{'england'}, $PostInputs('relativity'}, $PostInPuts{'lotr'} }; }; $dbh-commit; }; if ($@) { warn Transaction aborted because $@; $dbh-rollback; } Not that Acess supports transactions, but it's good practice that you may as well start learning. Besides I couldn't resist. --grin! 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: Auto increment - return value
At 8:59 AM -0600 5/9/01, Sterin, Ilya wrote: Actually with DBD::Mysql you can use $sth-{insertid}; with the statement handle to get the last autoincrement value. insertid is deprecated now. Better to use $dbh-{mysql_insertid}. Ilya Sterin -Original Message- From: Paul Cotter To: [EMAIL PROTECTED] Sent: 05/09/2001 8:20 AM Subject: Re: Auto increment - return value Not on the ones I have used. Normally (well my normal anyway) you have to extract it from elsewhere. For example, Sybase SQL anywhere you need select @@identity executed immediately afterwards. One other way is to put the insert a stored procedure and return the auto-increment value. However it IS database dependent. From: T.P.Afamdi Okeke [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, 09 May, 2001 01:31 PM If you perform an insert on a table with an auto-increment field, does DBI return the auto increment value of the row that was just inserted? -- Paul DuBois, [EMAIL PROTECTED]
RE: Problem with DBI and Access newbie
-Original Message- From: Sterin, Ilya [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 2:26 PM To: Neil Lunn; 'Trevor Webster'; [EMAIL PROTECTED] Subject: RE: Problem with DBI and Access newbie $SQL = qq|INSERT INTO Respondent (england, relativity, lotr) VALUES = ( '$england', '$relativity', '$lotr')|; And theres your problem. '$england' does not interpolate. You want $england and so forth. $england would interpolate, since it's enclosed in double quotes qq | ... Your right, my bad. Think I need glasses. Something isn't normal here. Best to run a trace and see what is actually happening. $england = test; print qq/this is just a '$england'/; would print this is just a 'test' Ilya Sterin -Original Message- From: Neil Lunn [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 12:11 AM To: 'Trevor Webster'; [EMAIL PROTECTED] Subject: RE: Problem with DBI and Access newbie Missed this before. My eyes hurt! Answer Below. -Original Message- From: Trevor Webster [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 5:03 PM To: [EMAIL PROTECTED] Subject: Problem with DBI and Access newbie Hello I am running a Perl script that is supposed to added a record to an MS Access database using the DBI module. I am testing the script using MS PWS on a Windows 2000 os with Activestate Perl 626. Input into the script comes from parsed form informtion, which is working successfully. When I run the script it appears to complete successfully. That is it doesn't return any script syntax or DBI error messages. But when I check the database the record has not been added. The database contains a single table with 4 columns: Respondent RespIdAutonumber england Text relativity Text lotr Text Below is a copy of the script: sub UpdateDatabase(){ use DBI; $DSN = Survey Results $myDb = DBI-connect('dbi:ODBC:Survey Results'); #Error trapping for invalid connection if (! $myDb){ print Failed to Connect $DSN\n; #end program as processing aborted die; } #Setup Variables for loading table data $england = $PostInputs{ 'england'}; $relativity = $PostInputs{ 'relativity'}; $lotr = $PostInputs{ 'lotr'}; $SQL = qq|INSERT INTO Respondent (england, relativity, lotr) VALUES = ( '$england', '$relativity', '$lotr')|; And theres your problem. '$england' does not interpolate. You want $england and so forth. Or even better: ### $SQL = qq|INSERT INTO Respondent (england, relativity, lotr) VALUES = (?,?,?)|; $sth = $dbh-prepare($SQLQ); eval { while (...) { # loop through each whatever $sth-execute($PostInputs{'england'}, $PostInputs('relativity'}, $PostInPuts{'lotr'} }; }; $dbh-commit; }; if ($@) { warn Transaction aborted because $@; $dbh-rollback; } Not that Acess supports transactions, but it's good practice that you may as well start learning. Besides I couldn't resist. --grin! 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. __ 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: Problem with DBI and Access newbie
-Original Message- From: Sterin, Ilya [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 2:29 PM To: Neil Lunn; 'Trevor Webster'; [EMAIL PROTECTED] Subject: RE: Problem with DBI and Access newbie Neil, not that I'm an Access expert, but I believe (almost sure) that Access supports transactions with Visual Basic ODBC and as macros, but are you saying that Access does not support transactions through DBI? I Honestly don't know. As long as the ODBC driver supports transactions, then Access will support transactions. I encourage anyone to try of course, which was what I was really saying. Ilya Sterin -Original Message- From: Neil Lunn [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 12:11 AM To: 'Trevor Webster'; [EMAIL PROTECTED] Subject: RE: Problem with DBI and Access newbie Missed this before. My eyes hurt! Answer Below. -Original Message- From: Trevor Webster [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 09, 2001 5:03 PM To: [EMAIL PROTECTED] Subject: Problem with DBI and Access newbie Hello I am running a Perl script that is supposed to added a record to an MS Access database using the DBI module. I am testing the script using MS PWS on a Windows 2000 os with Activestate Perl 626. Input into the script comes from parsed form informtion, which is working successfully. When I run the script it appears to complete successfully. That is it doesn't return any script syntax or DBI error messages. But when I check the database the record has not been added. The database contains a single table with 4 columns: Respondent RespIdAutonumber england Text relativity Text lotr Text Below is a copy of the script: sub UpdateDatabase(){ use DBI; $DSN = Survey Results $myDb = DBI-connect('dbi:ODBC:Survey Results'); #Error trapping for invalid connection if (! $myDb){ print Failed to Connect $DSN\n; #end program as processing aborted die; } #Setup Variables for loading table data $england = $PostInputs{ 'england'}; $relativity = $PostInputs{ 'relativity'}; $lotr = $PostInputs{ 'lotr'}; $SQL = qq|INSERT INTO Respondent (england, relativity, lotr) VALUES = ( '$england', '$relativity', '$lotr')|; And theres your problem. '$england' does not interpolate. You want $england and so forth. Or even better: ### $SQL = qq|INSERT INTO Respondent (england, relativity, lotr) VALUES = (?,?,?)|; $sth = $dbh-prepare($SQLQ); eval { while (...) { # loop through each whatever $sth-execute($PostInputs{'england'}, $PostInputs('relativity'}, $PostInPuts{'lotr'} }; }; $dbh-commit; }; if ($@) { warn Transaction aborted because $@; $dbh-rollback; } Not that Acess supports transactions, but it's good practice that you may as well start learning. Besides I couldn't resist. --grin! 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. __ 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.
Compile failure of DBI 1.15 on HP-UX 11
I've got Perl 5.6.1 running on a HP-UX 11 machine and am now attempting to install DBI 1.15. The log below shows what happens when I attempt to compile it - the important part being DBI.xs:696: parse error before `l'. Anyone have suggestions, or is this a bug? prompt perl Makefile.PL *** Note: The optional PlRPC-modules (RPC::PlServer etc) are not installed. If you want to use the DBD::Proxy driver and DBI::ProxyServer modules, then you'll need to install the RPC::PlServer, RPC::PlClient, Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you. You can install them any time after installing the DBI. You do *not* need these modules for typical DBI usage. Optional modules are available from any CPAN mirror, in particular http://www.perl.com/CPAN/modules/by-module http://www.perl.org/CPAN/modules/by-module ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module Checking if your kit is complete... Looks good Writing Makefile for DBI Remember to actually *read* the README file! Use 'make' to build the software (dmake or nmake on Windows). Then 'make test' to execute self tests. Then 'make install' to install the DBI and then delete this working directory before unpacking and building any DBD::* drivers. prompt make cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm cp DBIXS.h blib/arch/auto/DBI/DBIXS.h cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h cp lib/DBD/NullP.pm blib/lib/DBD/NullP.pm cp dbipport.h blib/arch/auto/DBI/dbipport.h cp lib/DBI/Format.pm blib/lib/DBI/Format.pm cp dbd_xsh.h blib/arch/auto/DBI/dbd_xsh.h cp lib/DBI/Shell.pm blib/lib/DBI/Shell.pm cp lib/DBD/ADO.pm blib/lib/DBD/ADO.pm cp DBI.pm blib/lib/DBI.pm cp lib/DBI/FAQ.pm blib/lib/DBI/FAQ.pm cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm cp lib/Bundle/DBI.pm blib/lib/Bundle/DBI.pm cp Driver.xst blib/arch/auto/DBI/Driver.xst cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm cp lib/DBD/Sponge.pm blib/lib/DBD/Sponge.pm cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm cp lib/DBD/Multiplex.pm blib/lib/DBD/Multiplex.pm /usr/bin/perl -p -e s/~DRIVER~/Perl/g blib/arch/auto/DBI/Driver.xst Perl.xsi /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/typemap Perl.xs Perl.xsc mv Perl.xsc Perl.c gcc -c -D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fno-strict-aliasing -I/usr/local/include -O-DVERSION=\1.15\ -DXS_VERSION=\1.15\ -fpic -I/opt/perl5/lib/5.6.1/PA-RISC2.0/CORE -Wall -Wno-comment -DDBI_NO_THREADS Perl.c /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/typemap DBI.xs DBI.xsc mv DBI.xsc DBI.c gcc -c -D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fno-strict-aliasing -I/usr/local/include -O-DVERSION=\1.15\ -DXS_VERSION=\1.15\ -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:696: parse error before `l' DBI.xs: In function `dbih_clearcom': DBI.xs:851: warning: unused variable `Perl___notused' DBI.xs: In function `dbih_get_fbav': DBI.xs:988: warning: unused variable `Perl___notused' DBI.xs: In function `dbih_set_attr_k': DBI.xs:1080: warning: unused variable `Perl___notused' DBI.xs: In function `log_where': DBI.xs:1498: warning: unused variable `Perl___notused' DBI.xs: In function `XS_DBI_dispatch': DBI.xs:1928: warning: unused variable `Perl___notused' *** Error exit code 1 Stop. promptperl -V Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=hpux, osvers=11.00, archname=PA-RISC2.0 uname='hp-ux milhouse b.11.00 a 9000782 2003356746 two-user license ' config_args='-Dcc=gcc -de' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fno-strict-aliasing -I/usr/local/include', optimize='-O', cppflags='-D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='hpux11.00' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 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=-lnsl -lnm -lndbm -lgdbm -ldld -lm -lc -lndir -lcrypt
RE: Compile failure of DBI 1.15 on HP-UX 11
I have not had a chance to try 1.15... it had some known other problems and Tim will be releasing a new version soon. Could you try to figure what the compile error is and then send that to the list... (and to tim). Once you have done that, I suggest you back down to perl 5.6.0 and DBI 1.14. Have you seen the README.hpux that I have posted to the list several times? Lincoln -Original Message- From: Robert Hancock [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 5:24 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Compile failure of DBI 1.15 on HP-UX 11 I've got Perl 5.6.1 running on a HP-UX 11 machine and am now attempting to install DBI 1.15. The log below shows what happens when I attempt to compile it - the important part being DBI.xs:696: parse error before `l'. Anyone have suggestions, or is this a bug? prompt perl Makefile.PL *** Note: The optional PlRPC-modules (RPC::PlServer etc) are not installed. If you want to use the DBD::Proxy driver and DBI::ProxyServer modules, then you'll need to install the RPC::PlServer, RPC::PlClient, Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you. You can install them any time after installing the DBI. You do *not* need these modules for typical DBI usage. Optional modules are available from any CPAN mirror, in particular http://www.perl.com/CPAN/modules/by-module http://www.perl.org/CPAN/modules/by-module ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module Checking if your kit is complete... Looks good Writing Makefile for DBI Remember to actually *read* the README file! Use 'make' to build the software (dmake or nmake on Windows). Then 'make test' to execute self tests. Then 'make install' to install the DBI and then delete this working directory before unpacking and building any DBD::* drivers. prompt make cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm cp DBIXS.h blib/arch/auto/DBI/DBIXS.h cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h cp lib/DBD/NullP.pm blib/lib/DBD/NullP.pm cp dbipport.h blib/arch/auto/DBI/dbipport.h cp lib/DBI/Format.pm blib/lib/DBI/Format.pm cp dbd_xsh.h blib/arch/auto/DBI/dbd_xsh.h cp lib/DBI/Shell.pm blib/lib/DBI/Shell.pm cp lib/DBD/ADO.pm blib/lib/DBD/ADO.pm cp DBI.pm blib/lib/DBI.pm cp lib/DBI/FAQ.pm blib/lib/DBI/FAQ.pm cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm cp lib/Bundle/DBI.pm blib/lib/Bundle/DBI.pm cp Driver.xst blib/arch/auto/DBI/Driver.xst cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm cp lib/DBD/Sponge.pm blib/lib/DBD/Sponge.pm cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm cp lib/DBD/Multiplex.pm blib/lib/DBD/Multiplex.pm /usr/bin/perl -p -e s/~DRIVER~/Perl/g blib/arch/auto/DBI/Driver.xst Perl.xsi /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/typemap Perl.xs Perl.xsc mv Perl.xsc Perl.c gcc -c -D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fno-strict-aliasing -I/usr/local/include -O-DVERSION=\1.15\ -DXS_VERSION=\1.15\ -fpic -I/opt/perl5/lib/5.6.1/PA-RISC2.0/CORE -Wall -Wno-comment -DDBI_NO_THREADS Perl.c /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/typemap DBI.xs DBI.xsc mv DBI.xsc DBI.c gcc -c -D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fno-strict-aliasing -I/usr/local/include -O-DVERSION=\1.15\ -DXS_VERSION=\1.15\ -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:696: parse error before `l' DBI.xs: In function `dbih_clearcom': DBI.xs:851: warning: unused variable `Perl___notused' DBI.xs: In function `dbih_get_fbav': DBI.xs:988: warning: unused variable `Perl___notused' DBI.xs: In function `dbih_set_attr_k': DBI.xs:1080: warning: unused variable `Perl___notused' DBI.xs: In function `log_where': DBI.xs:1498: warning: unused variable `Perl___notused' DBI.xs: In function `XS_DBI_dispatch': DBI.xs:1928: warning: unused variable `Perl___notused' *** Error exit code 1 Stop. promptperl -V Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=hpux, osvers=11.00, archname=PA-RISC2.0 uname='hp-ux milhouse b.11.00 a 9000782 2003356746 two-user license ' config_args='-Dcc=gcc -de' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -fno-strict-aliasing -I/usr/local/include', optimize='-O', cppflags='-D_HPUX_SOURCE -L/lib/pa1.1