Hello,
In my application, I have an Access table where, in one the columns, the items are
listed with quotation marks (e.i. "Reuters")
I need to make sure that when a user searches for that item, he/ she doesn't have to
type its name in the textbox with quotation
marks. For example: I type in Reuters in the textbox, but the database knows that
it's equal to "Reuters" in the database.
Do you have any suggestions? The following is my Java code, in case it's easier to
answer my question.
Thanks a lot,
Rimma
//[[SPIDER_EVENT<this_onBeforeDisplayEvent>
public int this_onBeforeDisplayEvent(CSpDisplayEvent event)
{
CSpValue source = CSpider.getUserSessionObject("sesSource");
CSpValue name = (CSpValue) new
CSpString((CSpider.getUserSessionObject("sesName")).toString().toUpperCase());
CSpValue letter = CSpider.getUserSessionObject ("sesLetter");
CSpSelect doQuery = (CSpSelect) CSpider.getDataObject ("DoQuery");
doQuery.clearDynamicCriteria ();
if (letter.toString().equals(" ")) {
if (source.toString().equals("Sheet2_Finesse")) {
doQuery.addDynamicCriterion
("Sheet2_Finesse",CSpCriteriaSQLObject.BEGINS_WITH_STR_OPERATOR, name);
}
else if (source.toString().equals("Sheet2__FID___")) {
doQuery.addDynamicCriterion
("Sheet2__FID___",CSpCriteriaSQLObject.BEGINS_WITH_STR_OPERATOR, name);
}
else if (source.toString().equals("Sheet2_Reuters")) {
CSpHtml.write("\"" + doQuery.addDynamicCriterion
("Sheet2_Reuters",CSpCriteriaSQLObject.BEGINS_WITH_STR_OPERATOR, name));
}
}
else {
doQuery.addDynamicCriterion
("Sheet2_Finesse",CSpCriteriaSQLObject.BEGINS_WITH_STR_OPERATOR, letter);
}
doQuery.execute ();
return (PROCEED);
}
//]]SPIDER_EVENT<this_onBeforeDisplayEvent>
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]