Error connecting to Vertica database via pdo
I am getting a problem connecting Vertica database from php using pdo which is throwing me an error.
[unixODBC] [Driver Manager] Data source name not found and no default driver specified "SQLSTATE SQLSTATE [IM002]
My connection string looks like this: -
$conn = new PDO('odbc:DRIVER={SOURCENAME};Server=localhost;Database=dashboard', "yogesh", "");
The same dsn works with the isql utility, but not with pdo.
+3
source to share