Re: One of us can't count....

2011-02-18 Thread Bruce Johnson
Tried it that way, same error. On Feb 18, 2011, at 12:33 PM, Bill Ward wrote: > You're probably calling do($sql, @args) when you should call do($sql, undef, > @args) > > On Fri, Feb 18, 2011 at 11:31 AM, Bruce Johnson < > john...@pharmacy.arizona.edu> wrote: >

Re: One of us can't count....

2011-02-18 Thread Bruce Johnson
ndeed good practice. > > Carl Furst > o/~ What a difference a byte makes... o/~ > > -Original Message- > From: Bruce Johnson [mailto:john...@pharmacy.arizona.edu] > Sent: Friday, February 18, 2011 3:07 PM > Cc: DBI Users List (dbi-users@perl.org) > Subject: Re:

Re: One of us can't count....

2011-02-18 Thread Bruce Johnson
No, this is done as: $csr=$dbh->prepare($sql) then as $csr->execute(@parms) inside of a loop. On Feb 18, 2011, at 12:33 PM, Bill Ward wrote: > You're probably calling do($sql, @args) when you should call do($sql, undef, > @args) > > On Fri, Feb 18, 2011 at 11:31 AM,

One of us can't count....

2011-02-18 Thread Bruce Johnson
27;A', :p6='0', :p7='Zimmt', :p8='Werner S', :p9='wsz'] at ./edsload.pl line 97, line 532. I've counted three times: I have 19 fields in the db, 19 '?'s, and 19 param values being passed, why am I getting this error? -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: Does DBD::Oracle support left outer join

2010-05-21 Thread Bruce Johnson
v5.8.5 to connect to our Oracle > 10.02.0400 dB. make sure the query works in SQLPlus. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: PERL DBI ORACLE DATABASE OUTPUT TO A FILE

2010-05-11 Thread Bruce Johnson
x27;re getting any rows? -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: Stupid Oracle question

2010-05-06 Thread Bruce Johnson
On May 6, 2010, at 11:34 AM, John Scoles wrote: Bruce Johnson wrote: Depends if you have |AutoCommit| on or not and if you DB and DBD friver can do a rollback. I've explicitly turned autocommit off, so I can roll back transactions if an error occurs. In the old Oraperl syntax

Stupid Oracle question

2010-05-06 Thread Bruce Johnson
If $dbh is my database handle, to roll back the current transaction I do: $dbh->rollback(); right? The DBD::Oracle docs don't explicitly say.... -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: How to discard the error in SQL query

2010-04-30 Thread Bruce Johnson
$ora_errstr)..." Oracle DBI doesn't stop the script, it just doesn't work, and goes to the next statement. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: Help on using << on *nix and Windows

2010-04-20 Thread Bruce Johnson
to be installed, you're SOL. You can try doing what you need with sqlplus scripts and procedures. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: (Fwd) How to loop through a database, row by row, and select and update one row at a time

2010-04-13 Thread Bruce Johnson
t;SELECT msgid, xmlcontent FROM messages WHERE msgid = 1892362" is also mildly inefficient, why are you returning the msgid when you already know it? do "SELECT xmlcontent FROM messages WHERE msgid = 1892362" instead. It's not much, but you're saving cycles and memory inside of a loop. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: Installing DBD::mysql on Mac OS 10.6.3 Snow Leopard

2010-04-07 Thread Bruce Johnson
here stuff is. The simplest way to get MySQL working properly with the local perl, in my experience, is to use MacPorts <http://www.macports.org/> (used to be DarwinPorts), and make sure the /opt/... paths are in your ENV. -- Bruce Johnson University of Arizona College of Pharmacy In

Re: parameter issues in DBD:Oracle

2010-03-26 Thread Bruce Johnson
On Mar 26, 2010, at 11:01 AM, Bruce Johnson wrote: Does the DBD enclose all parameters in ''s? Am I actually trying to execute: select reserved_id, reserver, purpose, to_char(starttime, 'HH:MI'), to_char(stoptime, 'HH:MI') from reservedroomtest where room

parameter issues in DBD:Oracle

2010-03-26 Thread Bruce Johnson
x27;03/23/2010 19:00', 'MM/DD/ HH24:MM') <= starttime and to_date('03/23/2010 20:00', 'MM/DD/ HH24:MM') >= starttime) or (to_date('03/23/2010 19:00', 'MM/DD/ HH24:MM') >= starttime and to_date('03/23/2010 19:00', 'MM/DD/ HH24:MM') < stoptime)) -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: DBI bind_param_inout question

2010-03-09 Thread Bruce Johnson
have to set it in my code. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: DBI bind_param_inout question

2010-03-08 Thread Bruce Johnson
t you're saying it's just a dummy value, it just has to have a value? -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

DBI bind_param_inout question

2010-03-08 Thread Bruce Johnson
n running for 6 or 7 years now and currval = 127,616). -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: Quick reality check...

2010-01-05 Thread Bruce Johnson
On Jan 5, 2010, at 10:11 AM, John Scoles wrote: Bruce Johnson wrote: I've got to update DBD::Oracle on a production machine (from our antique 1.17 version to the current one), in the process I'm changing the Oracle client as well.) will the proper setting of the enviro

Quick reality check...

2010-01-05 Thread Bruce Johnson
racle" via cpan suffice or do I have to go in and rip out the old stuff first... -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: Howto hard code ORACLE_HOME in DBD::Oracle Module

2009-11-23 Thread Bruce Johnson
n set environment variables like ORACLE_HOME via httpd.conf. This is how we do it. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: DB2, how to insert TIMESTAMP

2009-11-02 Thread Bruce Johnson
lse { $sth2->execute($c1, $memo); } -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: 'External Connections" on different Oracle versions.

2009-11-02 Thread Bruce Johnson
mechanism to do an 'external connect' and they seem to have opted for NO backward compatibility in this regard. How a bout going low and sneaky, and providing a username and password with appropriate privs for one or the other hardcoded into the app? -- Bruce Johnson Universit

Re: Odd problem with DBI and Oracle

2009-10-26 Thread Bruce Johnson
/lib ... the above is wrong. Lose the final '/lib' Knew it was something blindingly obvious I missed. Thanks! -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Odd problem with DBI and Oracle

2009-10-26 Thread Bruce Johnson
y're using the old ora_perl connect syntax: $lda = &ora_login($dbname,$login,$dbpass); substituting 'use Oraperl;' and using the old connection command produces the same error.) $dbname is of the format: "host=host-name.pharmacy.arizona.edu;sid=actual-sid" I'm sure it

Problems with insert returning value into bind variable

2009-10-12 Thread Bruce Johnson
sql code that is passed to the database: insert into institution (instid, inst_name, is_zoo) values (institution_seq.nextval, 'Roadrunner Zoo of The Canyons', 'Y') returning instid into :INSTIDNO So I know it's going out. If I omit the 'returning instid into :INSTIDNO' part

Re: question about DBD::Oracle

2009-10-02 Thread Bruce Johnson
under Cheers John Scoles as one would be using Bruce Johnson wrote: here's my problem. Due to some ancient database infrastructure I need to use an old version of DBD::Oracle compiled against an Oracle 8i client libs. We're setting ORACLE_HOME and LD_LIBRARY_PATH to be inherited fro

question about DBD::Oracle

2009-10-02 Thread Bruce Johnson
he) to use the new client and DBD::Oracle to use the old? -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: Problem with Oracle ODBC connection

2009-03-31 Thread Bruce Johnson
ce. As I said it's a weird thingit's that the 'thwe query is successful but doesn't return rows' of the OP in this thread is the same symptom that I have. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: Problem with Oracle ODBC connection

2009-03-31 Thread Bruce Johnson
racle 8.1.7 libs it works...); sqlplus on my Oracle 11 system does return rows. It's possible that the Oracle ODBC client is doing the same sort of thing to you. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinio

Re: DBD problem with knowing where Oracle is at.

2009-01-09 Thread Bruce Johnson
httpd process, usually root. I think I ran into something similar when I was setting up our new server a while back. I had to put a directive into the httpd.conf file: PassEnv LD_LIBRARY_PATH with the appropriate settings. -- Bruce Johnson University of Arizona College of Pharmacy Information Techn

mixing placehoders and functions with MySQL

2008-11-12 Thread Bruce Johnson
ax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' curdate())' at line 1 at ./ webdirectory_updater.pl line 128." I cannot mix parameters and functions like that? -- Bruce Johnson University of Arizona College of Pharmac

Re: No data returned from linked database

2008-09-12 Thread Bruce Johnson
BINARY NLS_CALENDARGREGORIAN NLS_NCHAR_CHARACTERSET US7ASCII Only difference is the NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET, but none of this involves anything unusual in the characters sets I believe, it's all ascii data. -- Bruce Johnson University of Arizona Colle

Re: No data returned from linked database

2008-09-10 Thread Bruce Johnson
DS 0 (0 Active) dbih_clearcom 0x8265f78 (com 0x81513a8, type 1) done. ! <> DESTROY for DBI::dr=HASH(0x8265f78) ignored (inner handle gone) --- test.pl #!/usr/bin/perl use DBI; $login="frs"; $dbpass="xx"; $dbname = "phmweb"; @nums = (0 .. 9); #make random part for tracefile $a .= join("", @nums[ map { rand @nums } ( 1 .. 4 ) ]); $fname = "trace$a.trace"; open(my $outf, ">$fname") or die "Couldn't open $fname $!\n"; $tracelevel = 6; DBI -> trace($tracelevel, $outf); $sq1 = "select first_name, last_name from employees_u where eid = '060007454'"; my $dbh = DBI->connect( 'dbi:Oracle:phmweb', $login, $dbpass, ) || die "Database connection not made: $DBI::errstr"; my $sth = $dbh->prepare($sq1); $sth->execute(); my ($fn, $ln); $sth->bind_columns(undef, \$fn, \$ln); while( $sth->fetch() ) { print "My name is $fn $ln or it should be \n"; } close(OUT); exit; -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: No data returned from linked database

2008-09-10 Thread Bruce Johnson
t via Database Links, etc. I and our RDB DBA checked out the compatibility issue first, the latest version of the OCI pServer emulates a Oracle 10.2 database. cheers John Scoles Bruce Johnson wrote: I've been banging my head against the wall for two weeks now on this one. I'm des

No data returned from linked database

2008-09-09 Thread Bruce Johnson
t a query through the database link, I can see the connection made, the query passed on, and column names come back, but no data. I can watch the SAME QUERY being run through SQLPlus and it works. Is this a DBD::Oracle bug? an OCI bug? Something I haven't thought of? -- Bruce Johns

Stupid question

2008-09-05 Thread Bruce Johnson
version CPAN gives me is 1.22. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: DBD::Oracle and oracle client versions

2008-08-28 Thread Bruce Johnson
On Aug 27, 2008, at 5:52 PM, Douglas Wilson wrote: On Wed, Aug 27, 2008 at 11:41 AM, Bruce Johnson <[EMAIL PROTECTED]> wrote: Is anything 'baked-in' from the oracle environment to a DBD:Oracle install at the time of installation? I'm having some weird problems invol

DBD::Oracle and oracle client versions

2008-08-27 Thread Bruce Johnson
ust by changing LD_LIBRRY_PATH and ORACLE_HOME? -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: DBD::Oracle issue

2008-08-27 Thread Bruce Johnson
fixed it, thanks. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

DBD::Oracle issue

2008-08-26 Thread Bruce Johnson
(only relevant ones listed.) CGI Environment ORACLE_HOME = /home/oracle/product/10.2.0/db_1 LD_LIBRARY_PATH = /opt/lampp/lib:/opt/lampp/lib:/home/oracle/product/ 10.2.0/db_1/lib What else could cause this problem? -- Bruce Johnson University of Arizona College of Pharmacy Information Technology

Re: Weird TNS error with DBI::Oracle 1.21 & oracle 11G

2008-07-30 Thread Bruce Johnson
wrong. The question may be academic anyway, I've been told we're nuking and re-building the server all over again as an exercise anyway. If it recurs, I know how to fix it. -- Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs

Re: Weird TNS error with DBI::Oracle 1.21 & oracle 11G

2008-07-30 Thread Bruce Johnson
wrong. The question may be academic anyway, I've been told we're nuking and re-building the server all over again as an exercise anyway. If it recurs, I know how to fix it; kludge it, rather, not fixing the underlying problem. -- Bruce Johnson University of Arizona College of P

Re: Weird TNS error with DBI::Oracle 1.21 & oracle 11G

2008-07-29 Thread Bruce Johnson
On Jul 29, 2008, at 11:51 AM, Bruce Johnson wrote: Perl 5.8, DBI 1.607, DBI::Oracle 1.21, Oracle 11g (11.1.0) Any script I try to run results in the error: Database connection not made: ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR

Weird TNS error with DBI::Oracle 1.21 & oracle 11G

2008-07-29 Thread Bruce Johnson
execute(); print &PrintHeader; #DBI::dump_results($ret); my ($thedate); $ret->bind_columns(\$thedate); while(($thedate) = $ret->fetchrow_array) {print "Today's date is $thedate \n";} $dbh->disconnect(); exit; The ENV stuff was attempts to see if it was some environmen

<    1   2