You need to sign in to do that
Don't have an account?

Using the queryMore call
{
//Get all the Accounts
qr = bindingIM.query("Select Id,Name from Account where RecordTypeId = '012200000004Tsn' or RecordTypeId ='012200000000Cyn' ");
boolean done = false;
if(qr.getSize()>0)
{
System.out.println("Fetched records:"+qr.getSize());
int iCount=0;
while(!done)
{
record_counter=0;
for(record_counter=0;record_counter<qr.getRecords().length;record_counter++)
{
iCount++;
System.out.println("Current record:"+iCount);
Account acct = (Account) qr.getRecords(record_counter);
ID cust_sf_no = null;
cust_sf_no = acct.getId();
String cust_name = acct.getName();
st.addBatch("INSERT INTO SFDC_CHANGE_CUSTOMER(CUST_SF_NO,CUST_NAME) " +
"VALUES('"+cust_sf_no+"','"+cust_name+"') ");
st.executeBatch();
con_id.commit();
}//end of for loop
if (qr.isDone())
{
done = true;
}
else
{
qr = bindingIM.queryMore(qr.getQueryLocator());
}
}//end of while done
} //end of if qr.getSize()>0
}//end of try
Could anyone please help me to solve this issue?....
Thanks in advance,
VN
No,the queryMore call is not failing.But even though i use the queryMore call,i am not able to process from the 2001th record.
When it comes to the 2001th record,the program terminates giving error as :
Error occured:2000.
Hi,
I think this may be due to the heap size. So while are calling the java client you can try the following command,
If u are calling jar file,
java -Xmx1024m -jar <jar file name>
if u are calling just a java class,
java -Xmx1024mr <class name>
Basically this will increase ur heap size and run the java class.
Thanks,
Ganesh