4 messages in com.mysql.lists.perlRE: Problem with new Version of DBD-m...| From | Sent On | Attachments |
|---|---|---|
| Krishnakishore R Challa | 07 Aug 2006 09:05 | |
| Randy Kobes | 10 Aug 2006 19:10 | |
| Krishnakishore R Challa | 11 Aug 2006 12:15 | |
| Patrick Galbraith | 11 Aug 2006 12:19 |
| Subject: | RE: Problem with new Version of DBD-mysql on Activeperl 5.8x![]() |
|---|---|
| From: | Krishnakishore R Challa (kris...@statefarm.com) |
| Date: | 08/11/2006 12:15:12 PM |
| List: | com.mysql.lists.perl |
I used the following script to test the problem. The first select statement will work fine. But when it hits the second select statement, a dialog box by WindowsXP comes up saying that there was an error.
================================================================ #!/usr/bin/perl
use DBI;
my $db = "index_db"; my $host = "localhost"; my $port = "3306"; my ($dbh, $success); $dbh = DBI->connect("DBI:mysql:database=$db;host=$host;port=$port","root", "xxxxxxx") or die "Couldn't connect to database: " . DBI->errstr;
my $select_url = $dbh->prepare_cached("SELECT URL FROM URL_TAB WHERE URL_ID = ?");
my $row_url;
$select_url->execute(1); $row_url = $select_url->fetchrow_array(); print "1 - $row_url \n"; $select_url->finish;
$select_url->execute(2); $row_url = $select_url->fetchrow_array(); print "2 - $row_url \n"; $select_url->finish;
$select_url->execute(3); $row_url = $select_url->fetchrow_array(); print "3 - $row_url \n"; $select_url->finish;
$dbh->disconnect;
exit; =======================================================
Thanks! Kishore.
-----Original Message----- From: Randy Kobes [mailto:ran...@theoryx5.uwinnipeg.ca] Sent: Thursday, August 10, 2006 9:11 PM To: Krishnakishore R Challa Cc: msql...@lists.mysql.com Subject: Re: Problem with new Version of DBD-mysql on Activeperl 5.8x
On Mon, 7 Aug 2006, Krishnakishore R Challa wrote:
Hi, I bought a new desktop and I installed ActivePerl 5.8.8.817, DBI 1.51, and DBD-mysql 3.0006_1. I install the DBI and DBD-mysql from http://theoryx5.uwinnipeg.ca/ppms. I have a perl program which has multiple sql statements accessing my database in Mysql 5.0. When the program hits the second sql statement I am getting an unknown error. The error message comes from Windows(XP Home), not from within the perl program. And the error doesn't say anything except that Perl program found an error. In my laptop I have WindowsXP-Home + ActivePerl 5.8.8.817 + DBI 1.50 (older version) + DBD-mysql 3.0006 (older version) + Mysql 5.0 and I don't get this error. As a work around I can't anymore get the DBI 1.50 and DBD-mysql 3.0006 (older versions) installed for ActivePerl 5.8 from http://theoryx5.uwinnipeg.ca/ppmpackages. I searched the google groups and did not find any post related to this error. I thought it has to be my desktop.. So, I removed the perl and other modules and reinstalled them in my laptop.. and now I am getting the same error in laptop also. I posted the above message in groups.google.com - perl.cpan.testers, and then I saw the document of DBD-mysql and got this email id. I do not know what is causing this error, DBI or DBD-mysql. But since they were the only new ones in my computer, I am guessing it is one of them. I will also be posting this message to the helpline of DBI. Please help me. Thanks in advance, Kishore.
I'm not sure if this problem is due to using a development DBD-mysql ppm package; I had put 3.0006_1 up in our repository, as a few people wanted to try out the support for stored procedures in it, but this doesn't seem to work well on Win32 at this time. I've now put back the latest stable release, 3.0006, in our http://theoryx5.uwinnipeg.ca/ppms/ repository, as well as the latest (1.52) DBI release; perhaps installing these will help with your problem.
By the way, can you provide a short example script illustrating the problem you had?
-- best regards, Randy Kobes




