CreateDataSource throws NullPointerException

When working with below code. It throws nullpointerException. Any suggestion where and why I went wrong

                   //Some code
                   var dataset = plugins.rawSQL.executeStoredProcedure(forms.formName.controller.getServerName(), procedure_declaration, args, typesArray, maxReturnedRows);
	var interest_rate = dataset.getValue(1, 1);
	var dataSource=dataset.createDataSource('datsourceName',[JSColumn.INTEGER,JSColumn.TEXT,JSColumn.NUMBER])   //THROWS NULLPOINTEREXCEPTION 
	
	//create form and specify datasource
	var createForm=solutionModel.getForm('formName')
	createForm.dataSource=dataSource
	
	//recreate UI
	forms['formName'].controller.recreateUI()

	var frmElement=createForm.getField(forms.formName.elements.emp_id.getName())
	frmElement.dataProviderID='ID'
		
	frmElement=empTimeForm.getField(forms.WeeklyTimeSheetDetails.elements.work_date.getName())
	frmElement.dataProviderID='TheDate'
                   var  fs=databaseManager.getFoundSet(dataSource)
			
	fs.loadAllRecords()
	
	forms.formName.foundset.loadRecords(fs)
	
	forms.formName.controller.recreateUI()

What is the exception in servoy_log.txt exactly? (full stack)
What Servoy version do you use?

Did you check ‘dataset’ contents - see if the number of rows/columns is what you expect it to be?

I am using Servoy Version: 6.0.3
I have checked dataset values it is returning correct resultset.

I don’t know whats problem.

Error Log.txt (4.03 KB)

Please create a case for this issue.
Thank you.

mskv1309,

If you file a case we will fix this.
As a workaround you can create a new dataset and copy all values over.

Rob