Feedback
Did this article resolve your question/issue?

   

Article

SQL_SUCCESS_WITH_INFO returned on SQLExecute() when an array insert fails with NULL constraint violation.

Information

 
TitleSQL_SUCCESS_WITH_INFO returned on SQLExecute() when an array insert fails with NULL constraint violation.
URL NameSQL-SUCCESS-WITH-INFO-returned-on-SQLExecute-when-an-array-insert-fails-with-NULL-constraint-violation
Article Number000178743
EnvironmentProduct: Connect for ODBC Oracle Wire Protocol driver
Version: 7.1
OS: Windows
Database: Oracle
Application: All supported applications.
Question/Problem Description
SQL_SUCCESS_WITH_INFO and below error message returned on SQLExecute() call when an array insert fails with NULL constraint violation using Arrays of Parameters.
Steps to Reproduce
Clarifying Information
The driver relies on the array-processing capabilities of the back end.
Oracle inserts all rows up to the row that caused the failure. The driver returns SQL_SUCCESS_WITH_INFO if some of the rows succeeded and will fill up the param status array which row succeeded or failed.
If all rows fail, SQL_ERROR will be returned.

According the ODBC spec :

https://msdn.microsoft.com/en-us/library/ms711818(v=vs.85).aspx

////
If the SQL_ATTR_PARAM_STATUS_PTR statement attribute has been set, SQLExecute or SQLExecDirect returns the parameter status array, which provides the status of each set of parameters. The parameter status array is allocated by the application and filled in by the driver. Its elements indicate whether the SQL statement was executed successfully for the row of parameters or whether an error occurred while processing the set of parameters. 
If an error occurred, the driver sets the corresponding value in the parameter status array to SQL_PARAM_ERROR and returns SQL_SUCCESS_WITH_INFO. The application can check the status array to determine which rows were processed. Using the row number, the application can often correct the error and resume processing.

///
Error Message[DataDirect][ODBC Oracle Wire Protocol driver][Oracle]ORA-01400: cannot insert NULL into ("TEST"."MH1"."CODEID") (1400)
Defect Number
Enhancement Number
Cause

 
Resolution
This is expected behavior.
 
Workaround
Notes
Last Modified Date12/7/2016 10:32 AM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.