When I go to the control panel, ODBC administrator, and I enter in my credentials I can connect to Teradata. However, when I try to connect to Teradata using php, I am receiving an "Warning: odbc_connect(): SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\wamp\www\neDivCollections\databaseConnectionTest.php on line 119" error.
My code is the following:
$sDBCName = '"NDW_PRODUCTION_NEW"';
$user = 'pmalle001';
$password = 'AAAA';
$database_path = 'BBBB';
$HostName = 'CCCC';
$DBName = "";
$userName = 'DDDD';
$dsn = "Provider=Teradata Database ODBC Driver 16.20;DBCName={$HostName};Database={$DBName};";
odbc_connect($dsn,$userName,$password);
I am using wamp for the server.
I found a link, found at https://support.teradata.com/community?id=community_blog&sys_id=8a98df271b9bfb00682ca8233a4bcb5d - and I am wondering if per the link, I need to install php and apache, then set up the configuration settings on the http config to point to the odbc connection for Teradata.
Any ideas or suggestions would be greatly appreciated.
My code is the following:
$sDBCName = '"NDW_PRODUCTION_NEW"';
$user = 'pmalle001';
$password = 'AAAA';
$database_path = 'BBBB';
$HostName = 'CCCC';
$DBName = "";
$userName = 'DDDD';
$dsn = "Provider=Teradata Database ODBC Driver 16.20;DBCName={$HostName};Database={$DBName};";
odbc_connect($dsn,$userName,$password);
I am using wamp for the server.
I found a link, found at https://support.teradata.com/community?id=community_blog&sys_id=8a98df271b9bfb00682ca8233a4bcb5d - and I am wondering if per the link, I need to install php and apache, then set up the configuration settings on the http config to point to the odbc connection for Teradata.
Any ideas or suggestions would be greatly appreciated.