Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Inline Mysql not able to connect (?)
System
TS 6.1.0 SP1, Win2k3
I have two scripts that are basically identical -- one is a Mysql callout and the other is an inline command, both called from the same DCT for now.
The callout works just fine, but the inline version does not. It returns the following error:
Root cause:
Mysql connect('database=<DB>;host=<HOST>:3306','<USER>',...) failed: Can't create TCP/IP socket (10106) at <SCRIPT> line 9 Can't call method "selectdb" on an undefined value at <SCRIPT> line 10.
Here is the script:
use Mysql;
$password = "<PASSWORD>";
$host = "<HOST>:3306";
$database = "<DB>";
$user = "<USER>";
$dbh = Mysql->connect($host,$database,$user,$password);
$dbh->selectdb($database);
$sth = $dbh->query("<QUERY>");
print qq^<substitution>^;
while (my $ref = $sth->fetchrow_arrayref) {
print qq^<option label="$$ref[0]" value="$$ref[0]"/>^;
}
print qq^</substitution>^;
exit();
(Important to note also that I've attempted this with and without the port number.)
Does anyone see some obvious flaw that I overlooked?? Please advise,
Dave
Find more posts tagged with
Comments
There are no comments yet