Sql Error
Jonathan Stowe
jns at its-going-to-be-fabulous.com
Thu May 15 16:51:34 BST 2008
On Thu, 2008-05-15 at 17:32 +0200, Abigail wrote:
> On Thu, May 15, 2008 at 04:15:06PM +0100, Hemant Verma wrote:
> >
> > Hi,
> >
> > Can any body please let me know how I can print the error message
> > associated with a query.
> >
> > Following is the psuedo code for perl.
> >
> > $query = "select * from table";
> >
> > If I make any mistake in this query like
> >
> > $query = "selects * from table";
> >
> > $result = $db->sql($query);
> >
> > I used to print error as $db-error();
> >
> > But it does not print any thing.
> >
> > How can I print the error message associated with this query.
>
> What I usually do is:
>
> local $dbh -> {AutoCommit} = 0;
Yeah but I believe the poor fool isn't using DBI but rather Win32::ODBC
or something so that won't help.
/J\
More information about the london.pm
mailing list