×
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.
-----Original Message-----
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of John Allen
Sent: Wednesday, February 17, 2010 12:54
Subject: Embedded SQL no record retrieved error handling
I am new to using embedded SQL, and am trying to learn it in
baby steps.
I did get my first program with embedded RPG to work fine. It
retrieves a
single value from a database record in a physical file.
Compiled, works fine as long as the record is found.
If the record is not found I get error: SQLSTT = 58004 SQLCOD = -901
Is it normal to get these when no record is retrieved by the SQL
That's right, you must inspect feedback codes to determine the success or failure of each and every SQL statement.
One way to deal with SQL states and codes is with 'whenever' SQL statements. These are pre-processor directive that can relieve the burden of inspecting feedback for specific state- and code-value, like -901 in your example. Unfortunately they are GOTO-based and so may not smoothly integrate with your beautifully and rigorously structured-programming coding style.
_______________
Confidentiality Notice: This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to
which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.
________________
As an Amazon Associate we earn from qualifying purchases.
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.