3

I am trying to connect an external database to get few data into Magento. I am using pdo_dblib to connect to the database.

try {
$hostname = "hostname";
$port = port;
$dbname = "dbname";
$username = "username";
$pw = "pwd";
$dbh = new PDO ("dblib:host=$hostname:$port;dbname=$dbname","$username","$pw"); 


}catch (PDOException $e) {
    echo "Failed to get DB handle: " . $e->getMessage() . "\n";
    exit;
  }
  echo "Passed";

I am getting the error message like SQLSTATE[01002] Adaptive Server connection failed (severity 9).

Now I am able to get a connection to database but when I try to call the stored procedure I am not getting anything. I am not able to log any errors also. Please help me on this.

Thanks in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.