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

Bug 360023

Summary: SQL NPE thrown when exiting a program that uses a prepare statement
Product: z_Archived Reporter: Joseph Vincens <jvincens>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Joseph Vincens CLA 2011-10-05 15:26:56 EDT
function func3(ds sqldatasource)
		rs1 SQLResultSet?;

		// OPEN a result set using the same SQLDataSource
		// This query happens to get all CUSTOMERs
		try
			sqlStmt SQLStatement?;
			prepare sqlStmt from ds with "select Name, id from Table1";
			open rs1 from ds with sqlStmt;
			foreach(myRecord from rs1) 
				Syslib.writeStdOut("Customer name: " + myRecord.name);
			End
		onException(ex SQLException)
	    	syslib.writeStdout(ex.message);
	   		syslib.writeStdout("ErrorCode:" + ex.ErrorCode);
    		syslib.writeStdout("SQLState:" + ex.SQLState);
	    end
			
	end
Comment 1 Joseph Vincens CLA 2011-10-05 15:50:24 EDT
fixed
Comment 2 Joseph Vincens CLA 2011-10-24 16:12:03 EDT
verified