Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S : updateRecord

 
henry ang
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

The updateRecord method has a String [] data argument. My qns is does this data argument need to be always having the size of 6.. mean data[0]==> name, data[1]==> location...

If this data array is just the data that need to be modified for eg.. data[0]==>owner.. How would one know that this val is belonging to the owner val and do the update accordingly.

The spec says field n appears in data[n] so i assume one would have to throw an exception if the data argument does not have 6 records.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I would assume a string array at least length 6. It could be longer than 6, I suppose, if you wanted to allow for expansion, but that would be less safe. You could assume you will get a null in the array elements that indicate fields that are not to be updated. A array element with an empty string would just cause blanking out of that field. The choice is yours.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic