Compara null from query

Hi all i have question again about compare but now is from null value. I have query to SQL and I compare returns value but if is still true :(. How I can compare this null values ?

testBarCode = system.db.runPrepQuery("SELECT barCode FROM maintenanceWarehouse WHERE barCode = ?",[barCode],"Technici")
if testBarCode is not None:

And I tried this but it is same


Thank you :smiley:

Running the query like that will always return a dataset, but it might have zero rows. Check for .rowCount>0 first, or consider using .runScalarPrepQuery().

Thank you so much I used compare rowCount and it is OK: D I forget that runQuery return always data: D: D Thanks

1 Like