Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363047

Summary: SQL - insert variations with variable list failing
Product: z_Archived Reporter: Paul Hoffman <hoffmanp>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: jvincens
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Test case.
none
library for loading database for test program
none
Test case for add / insert variations
none
library for loading database for test program none

Description Paul Hoffman CLA 2011-11-07 09:19:04 EST
Created attachment 206519 [details]
Test case.

SQL - insert variations with variable list failing.    Failing variations are:

1. execute from ds with sql#{ insert ... }
2. add a, b, c to ds with sql# { insert ... }

Same sql statement working with add row statements.

See attached test case.    Download both test case and load database library.
Comment 1 Paul Hoffman CLA 2011-11-07 09:19:38 EST
Created attachment 206520 [details]
library for loading database for test program
Comment 2 Paul Hoffman CLA 2011-11-07 09:21:50 EST
Test case output:


default add statement works
Check row 11
CNTL-1 default add statement works
Check row 12
execute insert sql statement fails
Failure:  Exception = A null value was used.
Add scalar list with sql statement fails
Failure:  Exception = At least one parameter to the current statement is uninitialized.: [sqlstate:07000][sqlcode:30,000]
Comment 3 Joseph Vincens CLA 2011-11-07 13:41:22 EST
fixed
Comment 4 Paul Hoffman CLA 2011-11-08 16:16:12 EST
Created attachment 206626 [details]
Test case for add / insert variations
Comment 5 Paul Hoffman CLA 2011-11-08 16:16:46 EST
Created attachment 206627 [details]
library for loading database for test program
Comment 6 Paul Hoffman CLA 2011-11-08 16:19:34 EST
Test reopened.

Inserts from execute statement with using list or add with scalar list are failing when a null value (in nullable col) is inserted in database.   Default adds work with same data.    Failing statements will also work if a value other than null is inserted into nullable column.

Test report:

default add statement works
Check row 11
CNTL-1 default add statement works
Check row 12
Add scalar list with sql statement fails
Failure:  Exception = A null value was used.
execute insert sql statement fails
Failure:  Exception = A null value was used.
Comment 7 Joseph Vincens CLA 2011-11-09 11:00:07 EST
I just installed the latest release and I get:
Start test for defect:  replace annotated record variations fail
default add statement works
Check row 11
CNTL-1 default add statement works
Check row 12
Add scalar list with sql statement fails
Check row 13
execute insert sql statement fails
Check row 14
So it looks like this was fixed indirectly.
Comment 8 Paul Hoffman CLA 2011-11-09 16:10:09 EST
Verified and closed