Trouble with ODBC connection
Posted: Wed Oct 10, 2007 8:48 pm
feyd | Please use
The database is Informix, driver is v 8.31 32 bit. Needless to say, I get "Connection Failed:" when I test it. Any suggestions?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
As the subject implies, I'm having some issues with setting up an ODBC connection. I believe I have the connection strings set up correctly but it fails every time. I am using a system DSN on Windows and the DSN works both in testing from the Windows ODBC Data Sources app and in Excel. Here's the php I'm using:Code: Select all
<?php
$conn=odbc_connect('mydb','un','pw');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$sql="SELECT * FROM table";feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]