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



On 24-Jan-2012 06:24 , Cole Gantz wrote:
My main concern is to be able to flag the record; put as much data
as possible into the field and continue processing without the
program ending poorly. If the record is flagged as 'Inactive' our
system will continue processing until a user can correct the record.

If DB2 would fill the offending field with as much data as possible
and return a SQL error to Java that I could trap for then that would
be perfect for me. I haven't been able to definitively find an answer
to that though.


Lacking any specifics... A SWAG how the situation could be handled:

The following pseudo-code describes some logic that should achieve the described-as desired final effect, though not a parallel to the described-as how to achieve that effect; For a TABLE (ACTIVE char /* I=inactive */, S char(35)):

the_original_insert(); /* insert into ... values('A', ? ) */
if sqlstate=22001 then do; /* value for a ? was too long */
the_modified_insert() /* values('I', cast(? as char(35))) */
if sqlstate<>'00000' then do;
UghhSoNowWhatBesides_LogError();
end;
end;

Regards, Chuck

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.