-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel
Brown
Sent: Tuesday, December 09, 2008 3:49 PM
To: David Stoltz
Cc: Bastien Koert; Dan Shirah; php-general@lists.php.net
Subject: Re: [PHP] MSSQL_CONNECT problem

On Tue, Dec 9, 2008 at 3:41 PM, David Stoltz <[EMAIL PROTECTED]> wrote:
>
> Do you have any other thoughts?

    When posting to the list, please don't top-post.

    Dave, are you seeing that error from both the CLI and the web?
Have you properly configured your DSN?  What's the output from the
following?

<?php
    mssql_connect('INTRA_SQL,1433', 'uname', 'password') or die('MSSQL
Error on Line '.__LINE__.': '.mssql_error());
    mssql_select_db('database') or die('MSSQL Error on Line
'.__LINE__.': '.mssql_error());
?>

-- 
</Daniel P. Brown>
http://www.parasane.net/
[EMAIL PROTECTED] || [EMAIL PROTECTED]
50% Off Hosting! http://www.pilotpig.net/specials.php



Sorry for "top posting", that's how my email client sets up the reply...

Anyway, I don't know what CLI is....? I see the error on the web. As for
a DSN, I didn't think I need one connecting this way. That is why the
uname, password, database is supplied, no? This should be a "dsn-less"
connection....

Either way - I tried adding a DNS on the web server, that points to the
SQL database, and that connection works...but the code I'm using from
the web page still does not....

If I use the code you gave me, this is what I get:

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to
server: INTRA_SQL,1433 in D:\Inetpub\wwwroot\cratos\test.php on line 2

Fatal error: Call to undefined function mssql_error() in
D:\Inetpub\wwwroot\cratos\test.php on line 2

Please advise....

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to