function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
srinivas pulipatisrinivas pulipati 

i am write below code by using batch apex but i have some error came so plz rectify the error?

global class CustmerBtach implements database.BatchableContext <sobject>{
    global String name;
    //global String Myname;
    global CustmerBtach(String Myname){
        this.myname =myname;
    }
    global database.QueryLocator start(Database.BatchableContext bc){
        String Query='select id,account_type__c from account where name=+myname';
        return Database.getQueryLocator(Query);
    }
    global void execute(Database.BatchableContext bc,List<Custamer__c> scope){
        List<Custamer__c> cust= new List<Custamer__c>();
        for(Custamer__c c:cust){
            cust.add(c);
        }
        update cust;
    }
    global void finish(Database.BatchableContext bc){
        Messaging.SingleEmailMessage myemail=new messaging.SingleEmailMessage();
        String[] toadd=new String[]{'srinivassfdc3@gmail.com'};
            myemail.setToAddresses(toadd);
             myemail.setSubject('Batch procesed');
            myemail.setplainTextBody('Batch completed sucessfully');
            messaging.sendEmail(new Messaging.Email[]{mymail});
    }
}
}