Jump to content

gianboy

Members
  • Posts

    4
  • Joined

  • Last visited

Reputation

0 Neutral

About gianboy

  1. Since my SQL server Express box is working with itself, i tried using it and pointing the sql server onto the SQL server 2005 where i log in and pulled the data resulted the script is working perfectly. what i find strange here is why my script can't run on my second machine which has Win2003 Server 64bit IIS 6 PHP why it can't access the MS SQL 2005 server, maybe I'm missing something on my configuration or some where?
  2. c:\program files (x86)\php
  3. I have set and configured ms sql extension on PHP... but still that error still come out. btw this is the script that i'm working on... include ("connection_credential.php"); if( !isset($_REQUEST['pole_hdl']) ) die("No keys"); $handle = ($_REQUEST['pole_hdl']); $myDB = "poleinfo"; //Pole database //create an instance of the ADO connection object $conn = new COM ("ADODB.Connection") or die("Cannot start ADO"); //define connection string, specify database driver $connStr = "PROVIDER=SQLOLEDB;SERVER=".$myServer.";UID=".$myUser.";PWD=".$myPass.";DATABASE=".$myDB; $conn->open($connStr); //Open the connection to the database ?> $arrKeys = split(",", $_REQUEST['pole_hdl']); //split list of keys into array foreach($arrKeys as $index => $handle) { $sql = ("SELECT PAIdt.Pacct, Type, Kind, Config, Height, Owner, DCPole, PoleAttach.Attach, Name, Pcs, JobOrder, BusData.BusID, BusData.BusDescription, BusData.NominalVoltage,BusData.SubTran, BusData.BusCategory FROM PAIDT, PoleAttach, PoleTagging, Outside, BusInfo, BusData WHERE handle = $handle "); $rs = $conn->execute($sql); $fldcnt = $rs->Fields->Count(); for ($i = 0; $i < $fldcnt ; $i++) { ?> $Fname = $rs->Fields[$i]->Name; if ($Fname == "Pacct") { echo "Pole Account"; } else { echo $rs->Fields[$i]->Name; } ?> Fields[$i]->Value ?> } ?> <?php $rs->Close(); $conn->Close(); $rs = null; $conn = null; ?>
  4. don't really know if it is a PHP, IIS, or MS SQL problem i have a php website trying to connect to MS SQL server from different machine. Setup Before : PHP website running on IIS 5 WinXP connecting to MS SQL Express 2005 ALL RUNNING ON THE SAME MACHINE WITH NO PROBLEM Setup Now : PHP website running on IIS 6 Windows 2k3 64Bit Trying Connecting to MS SQL 2005 Server on a Different Machine Now I'm encountering an Error "Fatal error: Uncaught exception 'com_exception' with message 'Source: Microsoft OLE DB Provider for SQL Server Description: Login failed for user ''.' in " PHP is working but anable to connect to MS SQL server... I've tried everything that I know installed SQL Client, etc... Please shed some light onto my dilema as I don't find anything on web that could make things work. Thank you, Noel
×
×
  • Create New...