+ Post New Thread
Results 1 to 2 of 2
Web Development Thread, Connection to SQL2005 using PHP in Coding and Web Development; Hi all, I have recently moved several databases from SQL2000 to 2005 and the last move I need to do ...
  1. #1
    FatBoy's Avatar
    Join Date
    Oct 2007
    Location
    Kent, UK
    Posts
    249
    Thank Post
    55
    Thanked 20 Times in 16 Posts
    Rep Power
    17

    Connection to SQL2005 using PHP

    Hi all,

    I have recently moved several databases from SQL2000 to 2005 and the last move I need to do to turn the old server off is our asset database, which is a website and made by my old network manager in PHP. I have successfully moved the databases across and recreated the uses on the databases in 2005 which has worked, as other vbscripts I have changed to the new server databases have worked well. Several of the web pages on this asset web site have the below code on and below that is what I have changed the code too.

    Line
    33 $myServer = "ASHFORDDB1";
    34 $myUser = "AUP";
    35 $myPass = "PassWord";
    36 $myDB = "AUDIT";
    37
    38 //connection to the database
    39 $dbhandle = mssql_connect($myServer, $myUser, $myPass)
    40 or die("Couldn't connect to SQL Server on $myServer");
    41
    42 //select a database to work with
    43 $selected = mssql_select_db($myDB, $dbhandle)
    44 or die("Couldn't open database $myDB");
    45

    I have just simply change the $myServer variable to the new server name\instants name (the old database on 2000 was the default instants)

    $myServer = "ASHFORDDB2\ICT";
    $myUser = "AUP";
    $myPass = "PassWord";
    $myDB = "AUDIT";

    When I load the web page parts of the page show but is obviously isn't accessing the DB because massive parts are missing.

    The error I get in FireFox is- window.addEvent is not a function Line: 44

    The error in IE is- object doesn't support this property or method Line: 44 Char: 4

    Do these errors mean anything to anyone as I don't know a lot about PHP so have come unstuck

    Thanks
    FB

  2. #2
    FatBoy's Avatar
    Join Date
    Oct 2007
    Location
    Kent, UK
    Posts
    249
    Thank Post
    55
    Thanked 20 Times in 16 Posts
    Rep Power
    17
    Solved found some extra areas were the server name needed changed

SHARE:
+ Post New Thread

Similar Threads

  1. Automatically Uninstall SQL2005?
    By Rawns in forum Windows
    Replies: 1
    Last Post: 30th June 2010, 09:45 AM
  2. SIMS - SQL2005 > SQL2008 Migration Problem
    By RobFuller in forum MIS Systems
    Replies: 26
    Last Post: 24th March 2010, 10:39 PM
  3. Guide on installing Full SQL2005 and SIMS
    By mrforgetful in forum MIS Systems
    Replies: 1
    Last Post: 12th August 2009, 02:38 PM
  4. PHP Database connection
    By apeo in forum Coding
    Replies: 3
    Last Post: 16th January 2009, 10:53 AM
  5. SIMS and SQL2005 on a 64bit OS
    By timbo343 in forum Windows
    Replies: 2
    Last Post: 8th May 2008, 08:52 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •