+ Start a Discussion
srinivas pulipatisrinivas pulipati 

Hi i am writing batch apex program but i have to get get the error where i save program please solve the program?

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});
    }
}
 Error:        Line:27 unexpected token: }



I am create Object API_Name Is: Custamer__c