public DataInfo[] criteriaFind(
String criteria ) throws
DatabaseException {
int numberOne = 1;
int numberTwo = 2;
int aIndex, bIndex;
String first, second, firstField, secondField;
aIndex = criteria.indexOf( '=' );
firstField = criteria.substring( 0, aIndex );
bIndex = criteria.indexOf( ',' );
first = criteria.substring( aIndex + numberTwo,
bIndex - numberOne );
aIndex = criteria.lastIndexOf( '=' );
secondField = criteria.substring( bIndex + numberOne,
aIndex );
bIndex = criteria.length();
second = criteria.substring( aIndex + numberTwo,
bIndex - numberOne );
}
Strings first & second represent the values in the Query Column and
Strings first field & second field represent the field names.
Is this parsing Okay,
Or is there a better way to do it?
Thanks for any reply.