On Thu 21 Nov 2002 03:03, David Wheeler <[EMAIL PROTECTED]> wrote:
> > That's the wrong question. The DBI spec actually makes no assumptions
> > about the syntax of the statements. But it does say that question marks
> > should be used for placeholders.
> >
> > Thing is, users tend to get upset (quite reasonably) when a driver
> > interprets question marks that are inside comments as real 
> > placeholders.
> 
> I guess I've never seen users use comments in SQL they're passing to 
> the DBI. I personally tend to use Perl comments.

You're right when the statements are embedded straight into the perl script,
but what happans when you have a SQL script that perl reads from a file to
execute?

It not so hard to think of that, I've done that quite often. Because I'm
working in a multi DB environment where my scripts need to run on all
supported DB's, so my SQL scripts to be parsed by perl not only have
(sometimes loads of) comments, they sometimes also have #ifdef like structures,
because I *know* that it is parsed by perl. Only drawback from then on is that
these scripts cannot be called from sql anymore.

Now you can say that I should have embedded that in perl from the start, but
sometimes historic reasons, or development changes through the scripts
lifetime.

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using perl-5.6.1, 5.8.0 & 633 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3,
     WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.024 &/| DBD-Unify
ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/


Reply via email to