Re: [PHP] MSSQL_CONNECT problem




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...


Try something like this:

$dbhost=\\\\SERVER\\INSTANCE_NAME,PORT;
$dbuser="USERNAME";
$dbpass="PASSWORD";
$db_connect=mssql_connect($dbhost,$dbuser,$dbpass) or die ('Server
connection failed');

$mssql_database = mssql_select_db("DATABASE", $db_connect) or die ('DB
selection failed');


Relevant Pages

  • Re: Help me with VPN
    ... You would need the NT server to be able to receive VPN calls. ... > office MS SQL database using the system we've created. ... > branch with both aDSL connection of 384Kbps. ...
    (microsoft.public.backoffice.smallbiz)
  • RE: [PHP] MSSQL_CONNECT problem
    ... Either way - I tried adding a DNS on the web server, ... SQL database, and that connection works...but the code I'm using ... Fatal error: Call to undefined function mssql_errorin ...
    (php.general)
  • SQL .NET STRING PROBLEM
    ... establish a connection with my sql database, that is in a MS 2003 server. ... message SQL SERVER DOES NOT EXISTS, but If I dont' do it I am getting the ...
    (microsoft.public.dotnet.framework)
  • Our server just went down...what might be causing this?
    ... Our site is built on .net and connects to a MS SQL database on another ... Our DB connection is down. ... Microsoft OLE DB Provider for SQL Server ... some ASPX pages can no longer be 'found' by ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Outgoing POP3 email missing/lost/not received
    ... Funny thing is that I have had this ISP for 8 years and it has always been ... It looks like when you last ran CEICW, you set the ISP's mail server to: ... Internet Connection Wizard. ... After the wizard completes, the following network connection ...
    (microsoft.public.windows.server.sbs)