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



John,

the only problem I see with this is that your testing of SQLStt doesn't
take into account warnings. During the FETCH the SQLStt may be '01nnn'
which is a warning and valid data may have been returned.
You already may be handling this but it just stuck out.

Rob
On 2012-10-26 9:33 AM, Voris, John wrote:

Even if you don't do anything with the SQLCODE in a mainline
loop-structure, returning an indication of the SQLCODE sure helps when
debugging.
When debugging, I just have to watch the returned nEOF indicator.
That is how I build out my SQL programs

nEOF = DeclareCursor();
nEOF = OpenCursor() ;
nEOF = FetchCursor() ;
If not nEOF ;
Dou nEOF ;
nEOF = FetchCursor() ;
Enddo ;
Endif ;

and in every SubProcedure:

Select ;
When SQLStt = '00000' ;
return *Off;
Other ;
return *On ;
Endsl ;


from: Alan Campin [1]<alan0307d@xxxxxxxxx>
The most common error made with SQL that I have seen is not error

checking each statement.

References

Visible links
1. mailto:alan0307d@xxxxxxxxx

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.