ANNOUNCE: IBM Informix Database Driver for Perl DBI Version 2005.01 (2005-03-14) released

2005-03-16 Thread Jonathan Leffler
IBM Informix Database Driver for Perl DBI Version 2005.01 (2005-03-14) has been uploaded to CPAN. IBM Informix Database Driver for Perl (also known as DBD::Informix) is the driver code that enables Perl 5.6.1 or later to access Informix databases via the DBI module (but if you are not already

connecting to informix via network

2005-03-16 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi all who help others, i would like to create a database handle to informix database on alpha maschine. what do i have: # uname -a OSF1 trm61 V4.0 878 alpha # /usr/informix/bin/tbstat -z RSAM Version 5.08.UD2 -- On-Line -- Up 07:53:56 -- 9968 Kbytes # i wrote a perl-script which works

connecting to informix via network

2005-03-16 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi all who help others, i would like to create a database handle to informix database on alpha maschine. what do i have: # uname -a OSF1 trm61 V4.0 878 alpha # /usr/informix/bin/tbstat -z RSAM Version 5.08.UD2 -- On-Line -- Up 07:53:56 -- 9968 Kbytes # i wrote a perl-script which works

Re: connecting to informix via network

2005-03-16 Thread Jonathan Leffler
Dear Walter, On 15 Mar 2005 20:00:38 -, PerlDiscuss - Perl Newsgroups and mailing lists [EMAIL PROTECTED] wrote: Hi all who help others, i would like to create a database handle to informix database on alpha maschine. what do i have: # uname -a OSF1 trm61 V4.0 878 alpha #

prepare statement with boolean variable types

2005-03-16 Thread Jon Lapham
I am curious what is considered best practice for referencing boolean types in DBI prepare statements. Normally I use the SQL syntax SELECT * FROM tbl WHERE boolcol or SELECT * FROM tbl WHERE NOT boolcol to query a boolean column, however this syntax does not seem placeholder-able. Maybe I am

Re: prepare statement with boolean variable types

2005-03-16 Thread Jon Lapham
Jon Lapham wrote: mu $sth = $dbh-prepare('SELECT * FROM tbl WHERE a=?, b=?, c=?, d=?'); oops, um, yeah, that should have been: my $sth = $dbh-prepare('SELECT * FROM tbl WHERE a=? AND b=? AND c=? AND d=?'); :) -- -**-*-*---*-*---*-*---*-*-*-*---*-*---*-*-*-*-*--- Jon Lapham

AW: connecting to informix via network

2005-03-16 Thread Meinertzhagen Walter
Hallo Jonathan, many thanks for your help. After i posted, I found a nice article in german from Jochen Wiedmann which explains in detail how to setup DBI:Proxy http://www.heise.de/ix/artikel/2000/10/176/ I am just bulding the modules ... Bye the way, I am really impressed from Perl and the

Re: Error in install of DBD 1.16 in Solaris 8 , Oracle 9.2

2005-03-16 Thread Kevin Carothers
On Tue, 15 Mar 2005 15:39:35 + (GMT), Sathyaprakash Rao [EMAIL PROTECTED] wrote: Hello, I am getting the below errors when I do make. I am trying to install DBD 1.16. I have Oracle 9.2 client full installed on Solaris 8. Can you please let me know a resolution? Please consider this

NULL field matching problem...

2005-03-16 Thread NIPP, SCOTT V \(SBCSI\)
I am working on a script that parses a csv file. The actual field delimiters in the file are pipes |. The problem I am running into is that if the field is empty, then the database is getting a '0' rather than 'NULL' as it should. The column is setup properly with NULLs allowed and the

RE: NULL field matching problem...

2005-03-16 Thread Ronald J Kimball
NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] wrote: I am working on a script that parses a csv file. The actual field delimiters in the file are pipes |. The problem I am running into is that if the field is empty, then the database is getting a '0' rather than 'NULL' as it

RE: NULL field matching problem...

2005-03-16 Thread NIPP, SCOTT V \(SBCSI\)
I thought about that after I hit the send button. Here is the INSERT code... my $sth = $dbh-prepare(INSERT INTO AllMid_Data VALUES(?.(,? x 21).)) or print Error with INSERT _prepare_ $DBI::errstr\n; my $test = $dbh-prepare(qq{SELECT * FROM AllMid_Data WHERE CPU_DNS = ? AND

DBD::Oracle - closing cursors returned from PL/SQL

2005-03-16 Thread Charles Jardine
perldoc DBD::Oracle says, under Binding Cursors: To close the cursor you (currently) need to do this: $sth3 = $dbh-prepare(BEGIN CLOSE :cursor; END;); $sth3-bind_param_inout(:cursor, \$sth2, 0, { ora_type = ORA_RSET } ); $sth3-execute; This works, and demonstrates that a cursor got from

RE: NULL field matching problem...

2005-03-16 Thread Ronald J Kimball
NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED] wrote: I thought about that after I hit the send button. Here is the INSERT code... my $sth = $dbh-prepare(INSERT INTO AllMid_Data VALUES(?.(,? x 21).)) or print Error with INSERT _prepare_ $DBI::errstr\n; my $test =

RE: NULL field matching problem...

2005-03-16 Thread CAMPBELL, BRIAN D (BRIAN)
I'm guessing that when a field is empty in your CSV file, then the method $csv-fields puts an empty string value (e.g. ) in the corresponding element in your @data array (not an undef value). If so, you are going to have to detect for this condition and change it to an undef before binding

RE: NULL field matching problem...

2005-03-16 Thread NIPP, SCOTT V \(SBCSI\)
That sounds good, but I am a little confused on exactly how to achieve that. I'll start poking around, but... Thanks for the pointer at least. Scott Nipp Phone: (214) 858-1289 E-mail: [EMAIL PROTECTED] Web: http:\\ldsa.sbcld.sbc.com -Original Message- From: CAMPBELL, BRIAN

RE: NULL field matching problem...

2005-03-16 Thread Ronald J Kimball
CAMPBELL, BRIAN D (BRIAN) [mailto:[EMAIL PROTECTED] wrote: I'm guessing that when a field is empty in your CSV file, then the method $csv-fields puts an empty string value (e.g. ) in the corresponding element in your @data array (not an undef value). If so, you are going to have to detect

Oracle nested selects

2005-03-16 Thread Charles Jardine
Oracle has a syntax for nested selects. E.g. select a, cursor(select b, ) . In each row fetched from such a select, some of the column values are themselves result sets. DBS::Oracle version 1.16 apparently does not support such select statements. An attempt to prepare such a statement

NULLs in Text::CSV_XS and DBD::CSV

2005-03-16 Thread Jeff Zucker
Ronald J Kimball wrote: CAMPBELL, BRIAN D (BRIAN) [mailto:[EMAIL PROTECTED] wrote: I'm guessing that when a field is empty in your CSV file, then the method $csv-fields puts an empty string value (e.g. ) in the corresponding element in your @data array (not an undef value). Yes, currently

RE: NULLs in Text::CSV_XS and DBD::CSV

2005-03-16 Thread Ronald J Kimball
-Original Message- Jeff Zucker [mailto:[EMAIL PROTECTED] wrote: Yes, currently Text::CSV_XS returns empty string for both empty strings and NULLs. I am considering providing an option to differentiate the two and return undef for NULLs. How do you distinguish between empty string

Re: NULLs in Text::CSV_XS and DBD::CSV

2005-03-16 Thread Jeff Zucker
Jeff Zucker wrote: I forgot to mention that DBD::AnyData (which also handles CSV and pipe delimited formats) returns undef for NULL, so if you use DBD::AnyData or plain AnyData you can get the undefs you want. Using plain AnyData, this will generate use of unitialized value warning for all

RE: NULL field matching problem...

2005-03-16 Thread Ian Harisay
after you populate @data you can do: (code is untested, but I think I have it right) foreach(@data){ $_ = undef if $_ =~ /^$/; } NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED] 03/16/2005 9:57:03 AM That sounds good, but I am a little confused on exactly how to achieve that. I'll start

Re: NULLs in Text::CSV_XS and DBD::CSV

2005-03-16 Thread Jeff Zucker
Ronald J Kimball wrote: Jeff Zucker [mailto:[EMAIL PROTECTED] wrote: Yes, currently Text::CSV_XS returns empty string for both empty strings and NULLs. I am considering providing an option to differentiate the two and return undef for NULLs. How do you distinguish between empty string and

Re: NULLs in Text::CSV_XS and DBD::CSV

2005-03-16 Thread Jeff Zucker
Jeff Zucker wrote: 1,,2 1,,2 In case I was unclear: the first is three fields with the second field NULL, the second is three fields with the second field an empty string. -- Jeff

RE: NULLs in Text::CSV_XS and DBD::CSV

2005-03-16 Thread NIPP, SCOTT V \(SBCSI\)
Still banging my head into a wall... Now I am getting NULLs inserted as expected into the database, but I am getting errors on the compare. my @old = $test-fetchrow_array (); foreach $n (0..20) { chomp($file_val = $data[$n]); $file_val =~ s/\s*$//;

last non-DBI attempt - reading MS Access .ldb (locked db file) with Perl

2005-03-16 Thread Willis, Frank A
DBI users group, Ive made one last attempt at looking for a way to read and parse out an (MS Access) .ldb (locked database) file independent of using the DBI. One suggestion that I received today was to split the contents of my buffer ($buf) up using the split command as follows:

Re: last non-DBI attempt - reading MS Access .ldb (locked db file) with Perl

2005-03-16 Thread amonotod
From: Willis, Frank A [EMAIL PROTECTED] Date: 2005/03/16 Wed PM 01:47:05 CST I?ve made one last attempt at looking for a way to read and parse out an (MS Access) .ldb (locked database) file You know, I've been wondering, why are even trying to do this? That's a file that's used by the

Re: DBD::Oracle - closing cursors returned from PL/SQL

2005-03-16 Thread Michael A Chase tech
On 03/16/2005 08:25 AM, Charles Jardine said: perldoc DBD::Oracle says, under Binding Cursors: To close the cursor you (currently) need to do this: $sth3 = $dbh-prepare(BEGIN CLOSE :cursor; END;); $sth3-bind_param_inout(:cursor, \$sth2, 0, { ora_type = ORA_RSET } ); $sth3-execute; This

RE: NULL field matching problem...

2005-03-16 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm used to Oracle, which treats an empty string as NULL. Is it different for MySQL? Yes, it is different for many other RDBMSs. Oracle has it dead wrong here, and many people consider it a bug, or at the least, a rather serious gotcha. - --

Re: NULLs in Text::CSV_XS and DBD::CSV

2005-03-16 Thread Michael A Chase tech
On 03/16/2005 09:50 AM, NIPP, SCOTT V (SBCSI) said: Still banging my head into a wall... Now I am getting NULLs inserted as expected into the database, but I am getting errors on the compare. my @old = $test-fetchrow_array (); foreach $n (0..20) { chomp($file_val =