Violeta Popa

Violeta Popa

  • NA
  • 137
  • 164.5k

cannot select db

Apr 14 2013 1:30 PM
Hi :) I'm trying to connect and select a database in SQLSERVER, but i keep getting this error:
"Warning: mssql_select_db() [function.mssql-select-db]: message: Database 'asigurari' does not exist. Make sure that the name is entered correctly. (severity 16) in C:\xampp\htdocs\info.php on line 4
"
The database exists, i should move it to a specific directory or what? Here's my code:

<?php
$conn = mssql_connect('localhost\SQLEXPRESS', '', '')
or die("Unable to connect to MSSQL");
$selectdb = mssql_select_db('asigurari',$conn);
if($selectdb)
echo"Conexiune realizata"."<br>";
?>

Answers (1)