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

Bug 360260

Summary: SQL scrolling functions failing - scrolling cursor not being used
Product: z_Archived Reporter: Paul Hoffman <hoffmanp>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jvincens
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Test program
none
Library to load database for test case none

Description Paul Hoffman CLA 2011-10-07 13:28:31 EDT
Created attachment 204766 [details]
Test program

SQL scrolling functions failing - scrolling cursor not being used.

Exception says:  Failure:  exception = The 'isFirst' method is only allowed on scroll cursors.: [sqlstate:XJ061][sqlcode:20,000]

See attached test case.
Comment 1 Paul Hoffman CLA 2011-10-07 13:31:12 EDT
Created attachment 204767 [details]
Library to load database for test case
Comment 2 Joseph Vincens CLA 2011-10-11 14:16:51 EDT
Created a new annotation SQLResulSetControl and support enumerations:
record SQLResultSetControl type Annotation {
	targets=[elementKind.fieldMbr],
	validationProxy = "org.eclipse.edt.compiler.binding.annotationType.SQLResultSetControlAnnotationTypeBinding"
}
	scrollablity SQLResultSetScrollablity? = SQLResultSetScrollablity.TYPE_FORWARD_ONLY;
	concurrency SQLResultSetConcurrency? = SQLResultSetConcurrency.CONCUR_READ_ONLY;
	holdability SQLResultSetHoldability?;
end

enumeration SQLResultSetScrollablity
	TYPE_FORWARD_ONLY = 1, 
	TYPE_SCROLL_INSENSITIVE = 2,
	TYPE_SCROLL_SENSITIVE = 3
end
enumeration SQLResultSetConcurrency
	CONCUR_READ_ONLY = 1, 
	CONCUR_UPDATABLE = 2 
end
enumeration SQLResultSetHoldability
	HOLD_CURSORS_OVER_COMMIT = 1, 
	CLOSE_CURSORS_AT_COMMIT = 2
end

The annotation is only valid on an SQLResultSet and it controls the generation of the Connection.callStatement and Connection.prepareStatement.
the annotation will be added to the specification the next time it's updated.
Comment 3 Paul Hoffman CLA 2011-10-17 14:51:55 EDT
verified, closed
Comment 4 Paul Hoffman CLA 2011-10-17 14:53:39 EDT
Verified, closed