Page 1 of 1
-Solved-
Posted: 14 Jul 2011, 06:11
by coolboy714cp
-Solved-
Posted: 14 Jul 2011, 09:40
by rjgtav
hi. In what line does the error happen? You can find it by adding a trace(number) in each line - the number starts from 0 and increases by 1 each line - and then check in which line it stops tracing. The error reports that you are trying to set something on a null object.
Maybe its because you do an if(cmd == "getInventory") inside the switch statement, which is not needed, and also because you only instantiate the returnData object inside the if statement. So i suggest you to instantiate the returnData object before the switch.
Posted: 14 Jul 2011, 23:01
by BigFIsh
You need to perform a check for the size of rows returned:
dbQuery.size() > 0
Otherwise, you'll get that error when you attempt to fetch the first row when it doesn't exist.