Re: how to insert a blank field in a date field

2002-08-09 Thread Stephane Legault/Quebec/IBM

Yes I use undef $variable;
But I also need to use
$sth2->execute( $test1, $test2, $test3, $test4, $test5 );
else
$sth2->execute( "$test1", "$test2", "$test3", "$test4", "$test5" ); which
not work with field date, time, interger (I did not check other type of
fields) but work with var type field!!!

Thansk to all




   

  "RMD"

  <[EMAIL PROTECTED]Pour :Stephane 
Legault/Quebec/IBM@IBMCA 
  >cc :

   Objet :   Re: how to insert a blank 
field in a date field   
  09/08/2002 06:24 

  PM   

   

   




Hi
Did it work, undefining the variable (setting it to null)?

regards

Ricardo Derbes
Altec SE
AlbarracĂ­n 157 - San Carlos de Bariloche
+54-2944-426892
[EMAIL PROTECTED]
- Original Message -
From: "Stephane Legault/Quebec/IBM" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 09, 2002 2:35 PM
Subject: how to insert a blank field in a date field


> I'am parsing a text field delimited by ; (see example belown). I split
the
> file into multiple variable ($) and then execute the request. When the NO
> is blank: no problem the record is write inside DB but when de DATE is
> blank I receive a message from DB telling me that the format of the date
is
> not good!!!
>
> I'am using DB2 all the field in the table can be null. Someone can help
> me???
>
> Thanks
>
>
>
> TEXT FILE
> no;date;text;blablabla








New version of DBD::ODBC

2002-08-09 Thread Jeff Urlwin

Fix for building with iODBC (which didn't have SQLAllocHandleStd).

The uploaded file

DBD-ODBC-0.45_13.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/J/JU/JURL/DBD-ODBC-0.45_13.tar.gz
  size: 77057 bytes
   md5: 52d4a4c74e568547648e6ed766df0615

No action is required on your part
Request entered by: JURL (Jeff Urlwin)
Request entered on: Fri, 09 Aug 2002 23:37:12 GMT
Request completed:  Fri, 09 Aug 2002 23:37:23 GMT

Virtually Yours,
Id: paused,v 1.81 2002/08/02 11:34:24 k Exp k 





RE: request for DBD::Changes change (and possible bug)

2002-08-09 Thread Jeff Urlwin

> -Original Message-
> From: Ted Thibodeau Jr [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 6:16 PM
> To: [EMAIL PROTECTED]
> Subject: request for DBD::Changes change (and possible bug)
>
>
> Hi there --
>
> I'm trying to track down a possible bug (might be in DBD::ODBC,
> might be in the iODBC SDK), and it's hard to tell when it might
> have crept in (and how many builds back I may need to go in
> DBD::ODBC), because there are no datestamps in DBD::Changes...
>
> DBI has changes at every build-version; doing something similar
> (even if it's only going forward) would be very helpful.

I probably need to add dates, that's true.  I have now, in
DBD::ODBC::Changes.pm (which will be installed in the newest version.
perldoc DBD::ODBC::Changes will now get you the change log.  I'm going to
move all change information from DBD::ODBC pod to DBD::ODBC::Changes to tidy
up ODBC.pm...

[snip]

> The error I'm getting is in the `make tests` --
>
> >[root@opllinux DBD-ODBC-0.45_11]# make test
> >PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
> -I/usr/lib/perl5/5.6.0/i386-linux -I/usr/lib/perl5/5.6.0 -e 'use
> Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
> >t/01baseinstall_driver(ODBC) failed: Can't load
> 'blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC:
> blib/arch/auto/DBD/ODBC/ODBC.so: undefined symbol:
> SQLAllocHandleStd at
> /usr/lib/perl5/5.6.0/i386-linux/DynaLoader.pm line 200.
> > at (eval 1) line 3
> >Compilation failed in require at (eval 1) line 3.
> >Perhaps a required shared library or dll isn't installed where expected
> > at t/01base.t line 14
> >t/01basedubious
>
> >Test returned status 255 (wstat 65280, 0xff00)
> >DIED. FAILED tests 4-5
>

Sigh

It's iODBC SDK not supporting all of ODBC 3.x.  I pretty much switched over
to using the 3.x as of .45_1, so it's within a few weeks.  I'll put out a
_13 to work around it...

Thanks for the report!  I've pretty much switched over to unixODBC now and
don't have the time to switch back and forth for testing.

Regards,

Jeff







RE: X case-insensitivity in Access

2002-08-09 Thread Shah, Urmil

SELECT * FROM People WHERE LName like '%hoff%'

 then use % before hoff and it will match hoff anywhere in the string(LName)

Urmil


-Original Message-
From: Nick Hoffman [UWO] [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002 5:34 PM
To: Shah, Urmil; DBI-Users
Subject: RE: X case-insensitivity in Access


What about matching 'hoff' in the middle? Such as:
Smith-Hoffman

Thanks,
Nick

>  -Original Message-
>  From: Shah, Urmil [mailto:[EMAIL PROTECTED]]
>  Sent: August 9, 2002 6:24 PM
>  To: '[EMAIL PROTECTED]'; DBI-Users
>  Subject: RE: X case-insensitivity in Access
>  
>  
>  Try
>  
>  SELECT * FROM People WHERE LName like 'hoff%'
>  
>  no % before hoff ( assuming it starts with hoffman, hoffroy, 
>  hoffsomething,
>  hoffanything..) and use single quotes 
>  it shuld match.
>  
>  urmil
>  
>  -Original Message-
>  From: Nick Hoffman [UWO] [mailto:[EMAIL PROTECTED]]
>  Sent: Friday, August 09, 2002 5:18 PM
>  To: DBI-Users
>  Subject: X case-insensitivity in Access
>  
>  
>  Hi. Apologies for my bad.
>  
>  SELECT * FROM People WHERE LName LIKE "%off%"
>  DOES return Hoffman and Offman.
>  
>  
>  How can I search for "Hoffman" with "hoff"?
>  
>  ie: SELECT * FROM People WHERE LName like "%hoff%"
>  Doesn't return Hoffman.
>  
>  Any ideas?
>  
>  Thanks,
>   Nick Hoffman
>  
>  >  -Original Message-
>  >  From: Nick Hoffman [UWO] [mailto:[EMAIL PROTECTED]]
>  >  Sent: August 9, 2002 6:06 PM
>  >  To: DBI-Users
>  >  Subject: case-insensitivity in Access
>  >  
>  >  
>  >  Hey. I'm using an Access2000 DB. I have the following 
>  >  information in a table
>  >  called People:
>  >Jones
>  >Hoffman
>  >Offman
>  >Smith
>  >  
>  >  How can I select everything that contains "off", regardless of
>  >  capitalization? (ie: select Hoffman and Offman with just "off")
>  >  
>  >  The following returns Hoffman but not Offman:
>  >SELECT * FROM People WHERE LName LIKE "%off%"
>  >  
>  >  So, is there a switch in SQL that compares thte search criteria 
>  >  to the data
>  >  case-insensitively?
>  >  
>  >  Thanks for your help!
>  >Nick Hoffman



RE: X case-insensitivity in Access

2002-08-09 Thread Nick Hoffman [UWO]

What about matching 'hoff' in the middle? Such as:
Smith-Hoffman

Thanks,
Nick

>  -Original Message-
>  From: Shah, Urmil [mailto:[EMAIL PROTECTED]]
>  Sent: August 9, 2002 6:24 PM
>  To: '[EMAIL PROTECTED]'; DBI-Users
>  Subject: RE: X case-insensitivity in Access
>  
>  
>  Try
>  
>  SELECT * FROM People WHERE LName like 'hoff%'
>  
>  no % before hoff ( assuming it starts with hoffman, hoffroy, 
>  hoffsomething,
>  hoffanything..) and use single quotes 
>  it shuld match.
>  
>  urmil
>  
>  -Original Message-
>  From: Nick Hoffman [UWO] [mailto:[EMAIL PROTECTED]]
>  Sent: Friday, August 09, 2002 5:18 PM
>  To: DBI-Users
>  Subject: X case-insensitivity in Access
>  
>  
>  Hi. Apologies for my bad.
>  
>  SELECT * FROM People WHERE LName LIKE "%off%"
>  DOES return Hoffman and Offman.
>  
>  
>  How can I search for "Hoffman" with "hoff"?
>  
>  ie: SELECT * FROM People WHERE LName like "%hoff%"
>  Doesn't return Hoffman.
>  
>  Any ideas?
>  
>  Thanks,
>   Nick Hoffman
>  
>  >  -Original Message-
>  >  From: Nick Hoffman [UWO] [mailto:[EMAIL PROTECTED]]
>  >  Sent: August 9, 2002 6:06 PM
>  >  To: DBI-Users
>  >  Subject: case-insensitivity in Access
>  >  
>  >  
>  >  Hey. I'm using an Access2000 DB. I have the following 
>  >  information in a table
>  >  called People:
>  >Jones
>  >Hoffman
>  >Offman
>  >Smith
>  >  
>  >  How can I select everything that contains "off", regardless of
>  >  capitalization? (ie: select Hoffman and Offman with just "off")
>  >  
>  >  The following returns Hoffman but not Offman:
>  >SELECT * FROM People WHERE LName LIKE "%off%"
>  >  
>  >  So, is there a switch in SQL that compares thte search criteria 
>  >  to the data
>  >  case-insensitively?
>  >  
>  >  Thanks for your help!
>  >Nick Hoffman



RE: X case-insensitivity in Access

2002-08-09 Thread Shah, Urmil

Try

SELECT * FROM People WHERE LName like 'hoff%'

no % before hoff ( assuming it starts with hoffman, hoffroy, hoffsomething,
hoffanything..) and use single quotes 
it shuld match.

urmil

-Original Message-
From: Nick Hoffman [UWO] [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002 5:18 PM
To: DBI-Users
Subject: X case-insensitivity in Access


Hi. Apologies for my bad.

SELECT * FROM People WHERE LName LIKE "%off%"
DOES return Hoffman and Offman.


How can I search for "Hoffman" with "hoff"?

ie: SELECT * FROM People WHERE LName like "%hoff%"
Doesn't return Hoffman.

Any ideas?

Thanks,
Nick Hoffman

>  -Original Message-
>  From: Nick Hoffman [UWO] [mailto:[EMAIL PROTECTED]]
>  Sent: August 9, 2002 6:06 PM
>  To: DBI-Users
>  Subject: case-insensitivity in Access
>  
>  
>  Hey. I'm using an Access2000 DB. I have the following 
>  information in a table
>  called People:
>   Jones
>   Hoffman
>   Offman
>   Smith
>  
>  How can I select everything that contains "off", regardless of
>  capitalization? (ie: select Hoffman and Offman with just "off")
>  
>  The following returns Hoffman but not Offman:
>   SELECT * FROM People WHERE LName LIKE "%off%"
>  
>  So, is there a switch in SQL that compares thte search criteria 
>  to the data
>  case-insensitively?
>  
>  Thanks for your help!
>   Nick Hoffman



X case-insensitivity in Access

2002-08-09 Thread Nick Hoffman [UWO]

Hi. Apologies for my bad.

SELECT * FROM People WHERE LName LIKE "%off%"
DOES return Hoffman and Offman.


How can I search for "Hoffman" with "hoff"?

ie: SELECT * FROM People WHERE LName like "%hoff%"
Doesn't return Hoffman.

Any ideas?

Thanks,
Nick Hoffman

>  -Original Message-
>  From: Nick Hoffman [UWO] [mailto:[EMAIL PROTECTED]]
>  Sent: August 9, 2002 6:06 PM
>  To: DBI-Users
>  Subject: case-insensitivity in Access
>  
>  
>  Hey. I'm using an Access2000 DB. I have the following 
>  information in a table
>  called People:
>   Jones
>   Hoffman
>   Offman
>   Smith
>  
>  How can I select everything that contains "off", regardless of
>  capitalization? (ie: select Hoffman and Offman with just "off")
>  
>  The following returns Hoffman but not Offman:
>   SELECT * FROM People WHERE LName LIKE "%off%"
>  
>  So, is there a switch in SQL that compares thte search criteria 
>  to the data
>  case-insensitively?
>  
>  Thanks for your help!
>   Nick Hoffman



RE: case-insensitivity in Access

2002-08-09 Thread Guidarelli, John

Hi Nick,

Try something like this:

  SELECT *
  FROM   people
  WHERE  UPPER(lname) LIKE '%OFF%';

Good luck.

-John

-Original Message-
From: Nick Hoffman [UWO] [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002 3:06 PM
To: DBI-Users
Subject: case-insensitivity in Access


Hey. I'm using an Access2000 DB. I have the following information in a table
called People:
Jones
Hoffman
Offman
Smith

How can I select everything that contains "off", regardless of
capitalization? (ie: select Hoffman and Offman with just "off")

The following returns Hoffman but not Offman:
SELECT * FROM People WHERE LName LIKE "%off%"

So, is there a switch in SQL that compares thte search criteria to the data
case-insensitively?

Thanks for your help!
Nick Hoffman





case-insensitivity in Access

2002-08-09 Thread Nick Hoffman [UWO]

Hey. I'm using an Access2000 DB. I have the following information in a table
called People:
Jones
Hoffman
Offman
Smith

How can I select everything that contains "off", regardless of
capitalization? (ie: select Hoffman and Offman with just "off")

The following returns Hoffman but not Offman:
SELECT * FROM People WHERE LName LIKE "%off%"

So, is there a switch in SQL that compares thte search criteria to the data
case-insensitively?

Thanks for your help!
Nick Hoffman




FreeBSD only issue with fetchall_arrayref?

2002-08-09 Thread Eric Frazier

Hi,

I can't figure out what could be causing this, but I am pretty certain that 
it is a Freebsd related to DBI issue.

I have FreeBSD 4.5 stable, mysql 4.0.1, DBI 1.30  both installed from 
ports, and DBD::mySQL 2.0416

The problem is when I use fetchall_arrayref  the last column is empty.

for Example:


Assuming you have a connection handle...


$cust_name_qu = "select cu_email,cu_firstname,cu_lastname from customer 
limit 1000,10";

my $sth = $dbh->prepare($cust_name_qu);
$sth->execute();

  my $rows= $sth->fetchall_arrayref();

my($i, $j);
   for $i ( 0 .. $#{$rows} ) {
   for $j ( 0 .. $#{$rows->[$i]}) {
   print "$rows->[$i][$j]\t";
   }
 print "  i:$i j:$j\n\n";
   }

I get output like this:


[EMAIL PROTECTED] Scott i:0 j:

[EMAIL PROTECTED]John Hi:1 j:

[EMAIL PROTECTED]  SCOTT W   i:2 j:

[EMAIL PROTECTED]   WANG  i:3 j:

[EMAIL PROTECTED]  Soh Chau  i:4 j:

[EMAIL PROTECTED]  Bryan G   i:5 j:

[EMAIL PROTECTED] Clark i:6 j:

[EMAIL PROTECTED]   Chern-Hoong   i:7 j:

[EMAIL PROTECTED]Leslie K  i:8 j:

[EMAIL PROTECTED] Russell M i:9 j:


I am missing the lastname, I tried this with various different queries and 
found it is consistent, if I use fetchrow_arrayref then I get the lastname 
column correctly. If I do this on Linux slackware, all is well, I get my 
lastname column.


Prayers and chicken sacrafices welcome,

Eric




Leading Edge Marketing Inc.
250-360-2992




Re: how to insert a blank field in a date field

2002-08-09 Thread RMD

I think you must not insert a blank value in the date field, instead you
must insert a 'null'
regards

Ricardo Derbes
Altec SE
AlbarracĂ­n 157 - San Carlos de Bariloche
+54-2944-426892
[EMAIL PROTECTED]
- Original Message -
From: "Stephane Legault/Quebec/IBM" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 09, 2002 2:35 PM
Subject: how to insert a blank field in a date field


> I'am parsing a text field delimited by ; (see example belown). I split the
> file into multiple variable ($) and then execute the request. When the NO
> is blank: no problem the record is write inside DB but when de DATE is
> blank I receive a message from DB telling me that the format of the date
is
> not good!!!
>
> I'am using DB2 all the field in the table can be null. Someone can help
> me???
>
> Thanks
>
>
>
> TEXT FILE
> no;date;text;blablabla




Re: how to insert a blank field in a date field

2002-08-09 Thread David Dooling

On Fri, Aug 09, 2002 at 01:35:03PM -0400, Stephane Legault/Quebec/IBM wrote:
> but when de DATE is blank I receive a message from DB telling me
> that the format of the date is not good!!!
> 
> Someone can help me???

Test if the variable storing the date field is the empty string.  If
it is, unsert undef (NULL) rather than the empty string.

> TEXT FILE
> no;date;text;blablabla

Something like this:

while (<>) {@a=split /;/; undef $a[1] unless $a[1];}

dd
-- 
David Dooling



how to insert a blank field in a date field

2002-08-09 Thread Stephane Legault/Quebec/IBM

I'am parsing a text field delimited by ; (see example belown). I split the
file into multiple variable ($) and then execute the request. When the NO
is blank: no problem the record is write inside DB but when de DATE is
blank I receive a message from DB telling me that the format of the date is
not good!!!

I'am using DB2 all the field in the table can be null. Someone can help
me???

Thanks



TEXT FILE
no;date;text;blablabla




FW: CPAN Upload: J/JU/JURL/DBD-ODBC-0.45_12.tar.gz

2002-08-09 Thread Jeff Urlwin

Fixed, the access violation upon global destruction (script end).

This will be the last patch for a bit as I want to see how the people who have 
reported bugs have fared with it.  If everything is quiet for a bit, I'll release this 
version as .46 and move on to array binding.  I just wanted to ensure things are 
stable first.

Regards,

Jeff


The uploaded file

DBD-ODBC-0.45_12.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/J/JU/JURL/DBD-ODBC-0.45_12.tar.gz
  size: 84792 bytes
   md5: 6439cf33df81ddc09b9b12aee43e7ada

No action is required on your part
Request entered by: JURL (Jeff Urlwin)
Request entered on: Fri, 09 Aug 2002 13:38:07 GMT
Request completed:  Fri, 09 Aug 2002 13:39:45 GMT

Virtually Yours,
Id: paused,v 1.81 2002/08/02 11:34:24 k Exp k 





Re: more about Proxy problem

2002-08-09 Thread jmelesky

On  8 Aug, Ning luo wrote:
> DBI->connect(hostname=monosiga.bcm.umontreal.ca;port=6503;dsn=dbi:Pg:dbname=tempDB) 
> failed: Cannot log in to DBI::ProxyServer: Unexpected EOF from server at 
> /usr/local/lib/perl5/5.8.0/sun4-solaris/RPC/PlClient.pm line 83.
> at test line 6
> Can't call method "disconnect" on an undefined value at test line 7.

Ah, yes, i had this problem as well.

In my case, it was the Storable module. Different versions of Storable
freeze their data in incompatible ways (so, for example, Storable v2.0
cannot read data stored by Storable v1.0.4). I had a different version of
Storable on my server than on my client machine.

I suspect either the same thing or something similar is happening for you.
However, you can start up dbiproxy with --debug in order to get more
information -- it should tell you what module is at fault.

Hope this helps.

-johnn