I’m getting an error message that I’m trying to pull a value from an Empty result set. The funny thing is, I run the SQL query somewhere else, and the results aren’t empty. (By “somewhere else”, I mean the Query section of Base. I create it by copying and pasting the SQL statement in my macro into a new Query in SQL mode.) Is there a good way to troubleshoot this?
In the macro, I put the SQL Query into a string,
sSQL = "SELECT MEASUREMENTDATA.ID, MEASUREMENTDATA.ACCEPTED FROM MEASUREMENTDATA JOIN FILTERITEMSINWORKORDERS4 ON MEASUREMENTDATA.ITEMINWORKORDER = FILTERITEMSINWORKORDERS4.ITEMINWORKORDER"
and then
oSQLStatement = oDB.createStatement
mQueryResult = oSQLStatement.executeQuery(sSQL)
mQueryResult.first
iDataSet =mQueryResult.getInt(1)
It’s that last line that yields the Empty Result error.
By “somewhere else”, I mean the Query section of Base. I create it by copying and pasting the SQL statement in my macro into a new Query in SQL mode.
Forgot to mention, it’s LO 5.3.6.1 on Win 10, Connecting to a MySQL DB for the backend.