× 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.



I am still trying to get SQL experience, and by way of a test I have
coded the following:

<procedure A>
C+ declare RHLCCursor scroll cursor              
C+     for RHLCSelect                            
c/end-exec                                       
c/exec sql                                       
c+ prepare RHLCSelect                            
c+    from :RHLC_Select                          
c/end-exec                                       

<procedure B>
C/exec sql                                                     
C+ open RHLCCursor                                             
C+     using :@i_HLCN08WNR                                     
C/end-exec                                                     

Now the compiler doesn't like this, it returns this error:
SQL0504  35    3542  Position 14 Cursor RHLCCURSOR is not declared.

(I have translated the error from dutch, so it might not match the
english description 1:1).

Remains the question: what have I missed here? I have declared the
cursor in procedure A and use it in procedure B. Is it so that because
they are procedures that the scope of the cursors has been limitted to
the defining procedure? I would like to keep the code in procedures (and
separate).

Any thoughts are welcome. 


Thanks in advance for your precious time,


Cor Takken


This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

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.