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
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
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_
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
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
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 :
; 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
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
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,
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
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
11 matches
Mail list logo