MySQL Forums
Forum List  »  Perl

Re: SQL to XML using DBIx::XML_RDB >> Can't connect to the database
Posted by: lauragarcia_b
Date: June 21, 2006 08:37PM

Bill, you were right. This module doesn't use the same data source format as the DBI module, so it requires a different type of connection syntax.

It worked when I changed the code from this

$data_source = "dbi:mysql:$database;host=localhost"

my $xmlout = DBIx::XML_RDB->new($data_source, 'mysql', $mySqlUsername, $mySqlPassword {'RaiseError' => 1, 'PrintError' => 1});


to this

my $XML_RDBdata_source = "$database:localhost";

my $xmlout = DBIx::XML_RDB->new($XML_RDBdata_source, "mysql", $mySqlUsername, $mySqlPassword);


Thank you.


Laura

Options: ReplyQuote


Subject
Written By
Posted
Re: SQL to XML using DBIx::XML_RDB >> Can't connect to the database
June 21, 2006 08:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.