Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3217300
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:23:42+00:00 2026-05-17T15:23:42+00:00

Up until yesterday I have been happily connecting to SQL Server Express 2005 using

  • 0

Up until yesterday I have been happily connecting to SQL Server Express 2005 using PHP 5 on IIS 7.

Yesterday I started getting errors when selecting a database.

<?php
$link = mssql_connect('localhost,1433', 'login', 'password');

if(!$link) {
    die('could not connect to MSSQL');
}

 if(!mssql_select_db('database', $link)) {
    echo mssql_get_last_message();
    die('could not select db');    
}    
?>

This outputs the following:

“Changed database context to ‘database’.could not select db”

So mssql_get_last_message is outputting Changed database context to 'database'. which seems all correct and isn’t really an error message. But then the mssql_select_db is still failing.

I have tested the following:

  • The login is correct (you get a different error changing the username or password)
  • The database exists (you get a different error if I use the name of a database that doesn’t exist
  • The login can connect to the database (you get a different error if you delete the database user in SQL Server)

I’m not sure what else to test.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:23:43+00:00Added an answer on May 17, 2026 at 3:23 pm

    Thanks to Martin and Phil for their responses. I created a new login and a new corresponding user which fixed the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started using virtualenv, and it was working normally until yesterday. Now, and
I have been using Mobclix in my application and haven't experienced any issues until
Since yesterday I started encountering errors related to date formats in SQL Server 2008.
I have been using the customer preview of Visual Studio 2012 up until day
Until yesterday everything was normal but today i try to lauch my application using
I have been running an MSDEPLOY command successfully for the past couple weeks until
I am new to using Microsoft development tools but have been using Visual Studio
i have a Magento site in which the checkout process worked fine until yesterday
I have a 3-part registration form using PHP: page 1 : collects info -
I have wordpress installation on my root folder, until yesterday it was working fine,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.