Changes the default database.
[Visual Basic] Shared Public Property DefaultDatabase As String [C#] public static string DefaultDatabase { get; set; } [C++] public: static __property String* get_DefaultDatabase(); public: static __property void set_DefaultDatabase(String* ); [JScript] public static function get DefaultDatabase() : String public static function set DefaultDatabase(String);
Set this property to change the database from the default database specified in the SqlConnection. Set the value to null (Nothing in Visual Basic) to use the default database specified in the SqlConnection.