private RDFStoreEnums.RDFStoreSQLErrors Diagnostics()
{
try {
//Open connection
this.Connection.Open();
//Create command
var command = new SqlCommand("SELECT COUNT(*) FROM sys.tables WHERE name='Quadruples' AND type_desc='USER_TABLE'", this.Connection);
//Execute command
var result = Int32.Parse(command.ExecuteScalar().ToString());
//Close connection
this.Connection.Close();
//Return the diagnostics state
return (result == 0 ? RDFStoreEnums.RDFStoreSQLErrors.QuadruplesTableNotFound : RDFStoreEnums.RDFStoreSQLErrors.NoErrors);
}
catch {
//Close connection
this.Connection.Close();
//Return the diagnostics state
return RDFStoreEnums.RDFStoreSQLErrors.InvalidDataSource;
}
}