Reputation: 113
I'm attempting to use a locally hosted ODBC connection using the Connx Driver (Its not my fault its what the client uses).
Anyway I cannot seem to get PHP's odbc connection to work. I get the following error with the following code:
Warning: odbc_connect(): SQL error: Unable to find CDD. File not found. () Error Code=(3) UserName=(NT AUTHORITY\IUSR), SQL state 08001 in SQLConnect in C:\inetpub\wwwroot\index.php on line 9 Connection Failed:
$conn = odbc_connect(
"DRIVER={CONNX32};Server=localhost;Database=PWTEST",
"username", "password");
I actually use the username and password of the main user who has full admin controls in the IIS7 setup. I'm just not sure why it can't connect. Finding the CDD file doesn't make sense I have it pointing directly to it. Am I missing something with IIS7 and its permission to access files outside of its normal directory? I'm new to Windows Servers, FYI. Thanks.
Upvotes: 0
Views: 3891
Reputation: 113
odbc_connect("driver=CONNX32;dd=C:\*****\******\******.cdd;uid=*******;pwd=******* ;", "*******", "*********");
Is the proper string for Connx type databases. Also I had to ensure that the Application was not using the user settings in IIS7. This had to be set to false.
Hope this helps anyone who has to deal with this stuff :)
Upvotes: 1
Reputation: 12985
Go to User DNS and try setting it up there and confirm it works.
ODBC connection strings are always fun to deal with. I so very much hate them!
Upvotes: 0