xSQL Schema Compare SDK version 9.5 for SQL Server
GetDatabase(String,String,String) Method


The name of the database.
The username to connect to the database.
The password to connect to the database. The password can be empty.
Returns a database object with the specified name, username and password.
Syntax
'Declaration
 
Public Overloads Function GetDatabase( _
   ByVal dbName As System.String, _
   ByVal username As System.String, _
   ByVal password As System.String _
) As SqlDatabase
public SqlDatabase GetDatabase( 
   System.string dbName,
   System.string username,
   System.string password
)
public: SqlDatabase* GetDatabase( 
   System.string* dbName,
   System.string* username,
   System.string* password
) 

Parameters

dbName
The name of the database.
username
The username to connect to the database.
password
The password to connect to the database. The password can be empty.

Return Value

A SqlDatabase object with the specified name.
Exceptions
ExceptionDescription
System.ArgumentException

The dbName parameter is empty or null

or

The username parameter is empty or null

SchemaExceptionThe database is not found.
Remarks
Call this method when you wish to use a dedicated connection for the database instead of the parent SQL Server connection.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SqlServer Class
SqlServer Members
Overload List

 

 


┬ęCopyright 2018 xSQL Software. All Rights Reserved.

Send Feedback