is there a way to tell if an sql lookup via databasemanager.getDataSetByQuery
worked?
i realize that if it works, it returns a JDataSet object;
what does it return if the lookup fails?
if(dataset.getMaxRowIndex()>0 )
{
//go ahead
}
else
{
//error message
}
application.setErrorCapture(true)
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), query, null, maxReturedRows);
var errorText = application.getLastErrorCode()
application.output(errorText)
application.setErrorCapture(true)
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), query, null, maxReturedRows);
var errorText = application.getLastErrorCode()
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), query, null, maxReturedRows);
var errorText = dataset.getExceptionMsg()
Return to Programming with Servoy
Users browsing this forum: No registered users and 3 guests