mATOK Posted November 23, 2006 Share Posted November 23, 2006 Is there a way using mssql_connect to specify a default db?Currently I am doing the following:line 42 - $cs = mssql_connect ( 'server\server', 'User', 'Password' ) or die ( 'Can not connect to server' );line 43 - mssql_select_db('dbname',$cs);Because the default db is off line I see 'Warning: mssql_connect(): message: Cannot open user default database. Using master database instead.'andWarning: mssql_select_db(): Unable to select database: dbname in f:\web\intranet\operations\bram\mail\connect.php on line 43 Link to comment https://forums.phpfreaks.com/topic/28272-mssql_connect/ Share on other sites More sharing options...
marcus Posted November 24, 2006 Share Posted November 24, 2006 [code]<?php $conn = mssql_connect('MYSQLSERVER', 'sa', 'password'); mssql_select_db('[my data-base]', $conn);?>[/code] Link to comment https://forums.phpfreaks.com/topic/28272-mssql_connect/#findComment-129374 Share on other sites More sharing options...
mATOK Posted November 24, 2006 Author Share Posted November 24, 2006 how is that different from what I am already doing? Link to comment https://forums.phpfreaks.com/topic/28272-mssql_connect/#findComment-129420 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.