On Fri, 6 Jun 2003 09:11:55 -0400  "Helck, Timothy" <[EMAIL PROTECTED]> wrote:

> You should include RaiseError=>1 in your connect and you might get more
> information about the problem.

Some error checking is always a good idea.  'use strict' and '-w'
should also be considered mandatory.  I have seen some reasonable
arguments against keeping '-w' in production web scripts, but 'use
strict' is always useful.

> Two things that I notice about your code:
> 
> I always put the call to  "bind_columns()" before the execute.

>From the section of `perldoc DBI` for bind_columns():

   For maximum portability between drivers, bind_columns should be
   called after execute. 

> I always put an "undef" as the first paramater to bind_columns(). It
> may not be necessary on newer versions of DBI, but it is in older
> versions.

My preference when I do that is {}.  It hasn't been required in a
current DBI for a long time though.

> If you don't already own it, consider buying "Programming the Perl
> DBI" from O'Reilly press.

Definitely a worthwhile investment.

-- 
Mac :})
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

Reply via email to