PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MySQL> <Mssql Functions
Last updated: Fri, 04 Jul 2008

view this page in

mssql_select_db

(PHP 4, PHP 5, PECL odbtp:1.1.1-1.1.4)

mssql_select_db — selecciona una base de datos MS SQL

Descripción

int mssql_select_db ( string $database_name , int $link_identifier )

Devuelve: TRUE si todo va bién, FALSE si se produce un error

mssql_select_db() selecciona como base de datos activa del servidor, la que está asociada al identificador de enlace especificado. Si no se especifica nigún identificador, se asume el último enlace. Si no hay ningún enlace abierto, la función intentará establecer un enlace como si se llamara a la función mssql_connect(), y lo usa.

Cada llamada a mssql_query() será realizada sobre la base de datos activa.

Ver también: mssql_connect(), mssql_pconnect(), y mssql_query()



add a note add a note User Contributed Notes
mssql_select_db
ifintel
10-Feb-2008 04:15
mssql_select_db() seems to truncate the databasename at the length of 30 characters. In my example the following error occured:

mssql_select_db("VeryLongDatabaseNameWhichIsReallyLong", $this->dbConn);

Warning: mssql_select_db(): message: Could not locate entry in sysdatabases for database 'VeryLongDatabaseNameWhichIsRea'. No entry found with that na
me. Make sure that the name is entered correctly. (severity 16) in...

A shorter databasename solved this issue.

MySQL> <Mssql Functions
Last updated: Fri, 04 Jul 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites