Global class BatchClas1 Implements database.Batchable <Sobject> {
Global Database.QueryLocator Start (Database.BatchableContext bcontext) {
String Searching = 'Select Name , Id , Student_name__c From Student__c where Stream_Opted__c = \'Data\' ';
**return Database.getQueryLocator(Searching);**
}
Global Void Execute (Database.BatchableContext bcontext, List<SObject> RecordstoPerform) {
If (!RecordstoPerform.isEmpty()) {
List<Student__c> StudentDelete = (List<Student__c>)RecordstoPerform;
**Database.DeleteResult [] Results = Database.delete (StudentDelete ,False);**
}
}
Global Void Finish (Database.BatchableContext bcontext) {
System.debug('Operation Completed');
AsyncApexJob J = [Select id,Status,TotalJobItems From AsyncApexJob where Id = :bcontext.getJobId()];
System.Debug (bcontext.getChildJobId());
}
}
Database
in your codebase? If so, my advise would be rename it