The best method to integrate a deployed viabl.ai application with other enterprise software applications (such as Database, CRM or ERP systems) is through their published REST Web Service API. These can be called using either one of the existing Integration Build Tools or via custom made connectors using viabl.ai JavaScript Scripts to access REST Web Services
However, if a published API is not available, then the developer can create their own Web Service using their preferred server-side scripting language to wrap an existing legacy access method. The example script below is written in PHP using PDO http://php.net/manual/en/book.pdo.php to query an MS Access database through ODBC:
<?php
$decoded = json_decode(file_get_contents("php://input"));
if ($decoded->{'key'}==123) {
//db call
$db_path = 'C:\Users\USER_ACCOUNT\Documents\web_db.mdb';
$database = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db_path; Uid=''; Pwd='';");
$para1 = $decoded->{'Company'};
$result=$database->prepare("SELECT Location FROM Table1 WHERE Company=:company");
$result->execute(array(':company'=>$para1));
$response = $result->fetch(PDO::FETCH_ASSOC);
$encoded = json_encode($response);
header('Content-type: application/json');
exit($encoded);
}
?>
To call the above custom web service from your viabl.ai application see Calling REST Web Services