Reply to Connection to MS SQL Server has stopped working

Your name:

Reply:


Posted by sank.hate.spam on 04/19/07 13:32

I made all the necessary changes to my server (windows 2k3 r2) in
order to get my php page to read from my MS SQL (v6.5) server (on
another machine). I was able to pull data down last night with no
problem. Today, however, I get nothing. The server I'm pulling from
is up and has no errors. If I change the login/password for the
connection string to something wrong, I don't get an error message.
In fact, the page is blank as if there was an error within the code
(this is regardless of whether I use a correct or incorrect login).
Yesterday when it was working, if I used the wrong login, I got the
usual error message back. If I comment out all the lines regarding
the connection, it builds the table just fine.

I've attached my code below (stripped out some table columns and data
manipulation code).

I have copied ntwlibd.dll to my windows\system32\ directory and
enabled the "extension=php_mssql.dll" line in my php.ini file.

If anyone has seen this before or has any suggestions, please let me
know... this is quite frustrating.

Thanks,
Jason

=====================================================

<?php

$con = mssql_connect('server', 'login', 'password');
if (!$con)
{
die('Could not connect: ' . mssql_error());
}

mssql_select_db("CM", $con);

$sql="SELECT *FROM Private_Build";

$result = mssql_query($sql);

echo "<table border='1'>
<tr>
<COL width='100'>
<th bgcolor='black' style ='color:white'>Patch ID</th>
</tr>";

while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['Packages'] . "</td>";
echo "</tr>";
}
echo "</table>";

mssql_close($con);
?>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация