Joel Henderson's prior comments are incorporated by reference.  :-)

I'm a bit confused because you say that the column value is "Reuters"
(including the quotes), but you are upshifting the name that you get from
the session object.

Assuming that the value is actually "REUTERS" (including the quotes), you
could change:
CSpValue name = (CSpValue) new
CSpString((CSpider.getUserSessionObject("sesName")).toString().toUpperCase());

to:

CSpValue name =new
CSpString("\"".concat(trim(CSpider.getUserSessionObject("sesName").toString(
).toUpperCase())).concat("\"));

Of course it wouldn't hurt to break that into a couple of statements for
the sake of readability.

-- Curt Springer, Team ND


At 08:57 AM 5/21/99 -0800, [EMAIL PROTECTED] wrote:
>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]
> 
_________________________________________________________________________

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]

Reply via email to