× 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 trying to insert to insert a record in a table using embedded SQL. When
there is an error I would like to return information to the caller of the
program.

The problem is when there is a constraint violation I get error messages of
SQL0530 and CPF502D as well as a SQL state of 23503 (Invalid value for
foreign key INSERT/UPDATE). However, I would like to be able to know the
name of the constraint I have violated in the program so that I can return
the information to the caller. The 2 messages have that information in them
and the SQL reference infers that it should be available in sqlerrmc (SQLERM
in RPG) from SQLCA; but sqlerrmc appears to be all blanks. Does anyone have
any idea where else the constraint violated might be accessed?

TIA,
Jay Himes


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.