AW: Perl DBI error

2009-07-07 Thread Thomas Bätzler
Dave Tang asked: > I am having a problem with binding a variable when executing on a DBI > object. [...] "You can only reliably bind values, not field or table names. Database that plan query execution won't accept this, because they need table and field names to make their query execution p

Perl DBI error

2009-07-07 Thread Dave Tang
Hi everybody, I am having a problem with binding a variable when executing on a DBI object. The code goes: #!/usr/bin/perl use warnings; use strict; use DBI; #DBI variables my $database = 'databaseName'; my $hostname = 'localhost'; my $dsn = "DBI:mysql:database=$database;host=$hostname"; my

Re: DBI error

2008-07-22 Thread Panda-X
Ah! Yes!! Thank you very much!! Problem fixed now =) 2008/7/22 Rob Dixon <[EMAIL PROTECTED]>: > > Panda-X wrote: > > > > I've got this error, anything I can do ? > > > > "Can't locate auto/DBI/data_source.al in @INC " > > > > Code : > > > >use DBI; > >my @dataSource = DBI -> data_

Re: DBI error

2008-07-22 Thread Rob Dixon
Panda-X wrote: > > I've got this error, anything I can do ? > > "Can't locate auto/DBI/data_source.al in @INC " > > Code : > >use DBI; >my @dataSource = DBI -> data_source ( "mysql" ) ; The method call is DBI->data_sources('mysql'); > and if I change the as this : > > us

Re: DBI error

2008-07-21 Thread Amit Saxena
On Tue, Jul 22, 2008 at 9:18 AM, Panda-X <[EMAIL PROTECTED]> wrote: > Hi, > > I've got this error, anything I can do ? > > "Can't locate auto/DBI/data_source.al in @INC " > > Code : > > use DBI; > my @dataSource = DBI -> data_source ( "mysql" ) ; > > and if I change the as this : > >u

DBI error

2008-07-21 Thread Panda-X
Hi, I've got this error, anything I can do ? "Can't locate auto/DBI/data_source.al in @INC " Code : use DBI; my @dataSource = DBI -> data_source ( "mysql" ) ; and if I change the as this : use DBI; my $dbh = DBI -> connect ( "dbi:mysql", $adm, $pass ) ; I got this error :

RE: How to cate DBI error and pass the control to subroutine?

2003-08-27 Thread Titu Kim
; fails, then put the insert > in the catch block. > > Rob > > > -Original Message- > From: Titu Kim [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 27, 2003 2:37 PM > To: [EMAIL PROTECTED] > Subject: How to cate DBI error and pass the control > to s

RE: How to cate DBI error and pass the control to subroutine?

2003-08-27 Thread Hanson, Rob
te ..."); ...Or if you only want to update when the insert fails, then put the insert in the catch block. Rob -Original Message- From: Titu Kim [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 2:37 PM To: [EMAIL PROTECTED] Subject: How to cate DBI error and pass the control t

How to cate DBI error and pass the control to subroutine?

2003-08-27 Thread Titu Kim
Hi, I am using DBI and DBD to insert into database. If the insert fails because of the key constraints, I want to continue to update that record. How can I it do this after I issue $sth->execute() statement? Thanks. __ Do you Yahoo!? Yahoo! SiteBuilder - Free,

Re: DBI error message

2001-09-25 Thread Andrea Holstein
Danilov Dmitry wrote: > > ... > #!/usr/bin/perl > use DBI; > my $dbh = DBI->connect > ("dbi:Sybase:mssql", 'test', 'test'); > die "Unable for connect to server $DBI::errstr" > unless $dbh; > my $rc; > my $sth; > $sth = $dbh->prepare("select * from test"); > if($sth->execute) { > while(@da

DBI error message

2001-09-24 Thread Danilov Dmitry
Hi ALL, I get pretty much all the time this error message when I try to connect to a remote MS SQL Server 2000 database. Anyone knows why this is happening and how to overcome it? Code looks like this #!/usr/bin/perl use DBI; my $dbh = DBI->connect ("dbi:Sybase:mssql", 'test', 'test'); die "Una