mssql and odbc functions
| From: | Martin Rokicki | Date: | Thu, 01 Mar 2001 18:07:35 +0000 |
| Subject: | mssql and odbc functions | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-5779@lists.php.net to get a copy of this message | ||
Hi All,
Thanks for the advice on database connectivity. I've tried
connecting to the mssql server (which is running 2000 not 6.5 as I had
thought) with the mssql_connect function as well as the odbc_connect
function. When I run the mssql connect I use this code:
MSSQL_CONNECT($host,$user,$pass)
The variables are all defined with the correct values, but I receive an
error message:
Fatal error: Call to undefined function: mssql_connect() in
c:\inetpub\wwwroot\stpweb\test\mssql.php on line 7
I've looked through the PHP documentation and tried a couple of fixes for
this error, but no luck so far. Also when I try to connect to the database
using odbc connect and this code:
odbc_connect("dsn","uid","pas");
I get this message:
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified, SQL state IM002 in SQLConnect
I have the DSN defined as a system dsn, and it works when tested. I know I'm
screwing something up, but I'm not sure what. Any help you could give would
be appreciated.
Regards,
Martin