| Author |
Message |
Dan Green
Rating: N/A Votes: 0 (Vote!) | | Posted on Wednesday, March 12, 2003 - 02:11 pm: |
|
Questions or comments about this webMethods Ezine article? Click here to read the original text. |
Will Kriski
Rating: N/A Votes: 0 (Vote!) | | Posted on Wednesday, March 12, 2003 - 02:19 pm: |
|
Good article. I prefer to use the IDataUtil class for parsing the IData object since you can retrieve the desired value in one line rather than two. I have also gotten into trouble using 'first' when trying to reset an existing pipeline variable. So we can replace the following two lines: idcItem.first("Price"); String price = (String)idcItem.getValue(); with: String price = IDataUtil.getString(idcItem,"Price"); There are other API calls for getting IData records, arrays, etc. Will |
Fred
Rating: N/A Votes: 0 (Vote!) | | Posted on Wednesday, March 12, 2003 - 02:19 pm: |
|
Good suggestion. The cursor position after a first returned false was not defined in the initial release of IData (I believe this was IS 3.5). So code like: idcItem.first("Price"); String price = (String)idcItem.getValue(); could return unexpected results if first returns false and the cursor was positioned off the end of the data set or if it was left were it was before the first call. String price = null; if (idcItem.first("Price")) price = (String)idcItem.getValue(); force the behavior that most people expect. IDataUtil.get provides this behavior in one line. |
Carl
Rating: N/A Votes: 0 (Vote!) | | Posted on Wednesday, March 12, 2003 - 02:19 pm: |
|
Great Suggestions! Thanks! |