× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Here is my stored procedure:

      * Stored procedure Test.


     Dsearch           S             15
     Dselect           S              1
     Dstatement        S           1000

     C     *entry        Plist
     C                   parm                    search
     C                   parm                    select
      * Exact Search
     c                   select
     c                   when      select = '1'
     C                   eval      statement = 'select * from +
     c                             mwlib/shipto where store  = "' +
     c                             %trimr(search) + '" order by cusno'
      * Fuzzy Search
     c                   when      select = '2'
     C                   eval      statement = 'select * from +
     c                             mwlib/shipto where store like %"' +
     c                             %trimr(search) + '%" order by cusno'
     c                   endsl

     c/exec sql
     c+ prepare stmt from :statement
     c/end-exec

     C/exec sql
     C+ declare c1 cursor for stmt
     C/end-exec

     c/exec sql
     c+ open c1
     c/end-exec

     c/exec sql
     c+ set result sets cursor c1
     c/end-exec

     c/exec sql
     c+ close c1
     c/end-exec

     c                   return


I'm getting a "Cursor State Not Valid" when executing via a Java Class.

Another question: If I change the procedure, must I drop it and re-add it
to the database even if I don't change the parameters?

thanks

Mark



Mark Walter
Sr. Programmer/Analyst
Hanover Wire Cloth a div of CCX, Inc.
mwalter@hanoverwire.com
http://www.hanoverwire.com
717.637.3795 Ext.3040

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.