Examples
Overload List
Name | Description | |
---|---|---|
![]() | Exists()()()() |
Check if database is already on server based on settings passed on constructor
|
![]() | Exists(String) |
Check if database is already on server
|
Examples

WIDatabase WIDB; CDatabaseInfo DBInfo; /* Create CDatabaseInfo object and populate with database login info */ DBInfo = new CDatabaseInfo(); DBInfo.DatabaseType = eDatabaseType.SQL; DBInfo.Location = "SqlServer"; DBInfo.DBName = "TestDatabase"; DBInfo.Username = "LoginName"; DBInfo.Password = "LoginPassword"; /* Create new instance of WIDatabase */ WIDB = new WIDatabase(DBInfo); /* Checks if database 'TestDatabase' is already on SQL server 'SqlServer' */ if (WIDB.Database.Exists()) MessageBox.Show("Database 'TestDatabase' exists"); /* Checks if database 'Test2' is already on SQL server 'SqlServer' */ if (WIDB.Database.Exists("Test2")) MessageBox.Show("Database 'Test2' exists"); WIDB.Close();