1
Answer

cannot select db

Ask a question
Violeta Popa

Violeta Popa

11y
1.1k
1
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)