Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 21
Registered: ‎08-31-2011
My Device: Touch 4.5
My Carrier: Airtel

FieldFullException while adding Contacts in a loop to blackberry

how do I resolve this. It looks pretty strange to me.

 

Suppose I want to create 10 contacts in the ContactBook of BlackBerry.

 

I run a loop for 0-9 

 

e.g.

 

//for 10 Iterations

{

String[] name = new String[ blackBerryContactList.stringArraySize( Contact.NAME ) ];

name[Contact.NAME_GIVEN] = getGivenName();

 

c1.addStringArray(BlackBerryContact.NAME, BlackBerryContact.ATTR_NONE, name)

c1.commit();

}

 

 

this runs fine in the 1st iteration of the Loop, but when 2nd iteration comes in, the

c1.commit(); method throws 'FieldFullException'

 

 

Can someone guide me with this?

Developer
Posts: 516
Registered: ‎07-23-2010
My Device: 9900

Re: FieldFullException while adding Contacts in a loop to blackberry

You are using c1 for all interactions. Is that what you are trying to achieve or are you creating 10 different contacts?