Hey Don, this code will loop the records to build the  range list faster than anything you can do with straight Axapta.

 

 

static void pl_scratch(Args _args)

{

    docuRef                         dr;

    Connection                      con = new Connection();

    Statement                       sqlStmt = Con.createStatement();

    ResultSet                       sqlTable;

    notes                           sqlStr;

    str                             searchWord;

    str                             rangeList;

    ;

 

    searchWord = "Remark";

 

    sqlSTR = strFmt("select recID from docuref where notes like '\%%1\%'", searchWord);

 

    info(sqlStr);

 

    sqlTable = sqlStmt.executeQuery(sqlSTR);

 

     while (sqlTable.next()){

 

      //build recidList to use in other query

      rangeList = rangeList + (rangeList ? ", " + int2STR(sqlTable.getInt(1)) : int2STR(sqlTable.getInt(1)));

    

     }

    info(rangeList);

 

}

 

-----Original Message-----
From: Jacob Christian Døskeland [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 22, 2004 1:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [development-axapta] Re: Filtering on a memo field

 

As far as i know it's not possible to use where statements on a memo field. It's a limit in SQL server.
So i think you need to loop the whole table and strscan() the field, and then build the queryranges.

JAcob

At 17:06 22.01.2004 +0000, you wrote:

Invalid Range Type


--- In [EMAIL PROTECTED], "Jonathan St-Louis"
<[EMAIL PROTECTED]> wrote:
> Hi, what kind of exeption do you have? 
>   ----- Original Message -----
>   From: axaptacoder
>   To: [EMAIL PROTECTED]
>   Sent: Thursday, January 22, 2004 10:30 AM
>   Subject: [development-axapta] Filtering on a memo field
>
>
>   Hi All,
>
>     Has anybody ever been able to come up with a solution to
filter on
>   a memo field?  Currently if you try to set a range on this type
of
>   field it will throw an exception. The only possible solution
I've
>   thought of is searching the table myself in a loop and building
a
>   range of recids to pass on to the query.  So that's probably not
>   good for performance. I would appreciate any hint or solution.
>
>
>
>   Thanks
>
>   Don
>
>
>
>
> -------------------------------------------------------------------
-----------
>   Yahoo! Groups Links
>
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/development-axapta/
>      
>     b.. To unsubscribe from this group, send an email to:
>     [EMAIL PROTECTED]
>      
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms
of Service.


Yahoo! Groups Links

·         To visit your group on the web, go to:

·         http://groups.yahoo.com/group/development-axapta/

·          

·         To unsubscribe from this group, send an email to:

·         [EMAIL PROTECTED]

·          

·         Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



 


Yahoo! Groups Links

·         To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
 

·         To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
 

·         Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




Yahoo! Groups Links

Reply via email to