Page 1 of 1
Bad Data Returned
Posted: Tue Apr 14, 2020 7:19 pm
by jtech
I am trying to use the SQL Query Analyzer plugin to delete timeslips from a former client. I can select the data I want with no problems, but when I change SELECT to DELETE i get the error:
Bad Data Returned -> Object reference not set to an instance of an object.
Any thoughts on what could be causing this? SQL commands below:
SELECT * FROM timeslips WHERE clientid='12';
DELETE * FROM timeslips WHERE clientid='12';
Re: Bad Data Returned
Posted: Thu Apr 16, 2020 2:47 pm
by Cubert
Sound like your on build 1.0.2
We have 1.0.3 out which adds a new control. A check box that sets whether or not data is returned in query. Then we run different queries functions based on that input.
1.0.3 is located here.
https://delivery.shopifyapps.com/-/c2dc ... 1b9fc3d5b4
Re: Bad Data Returned
Posted: Thu Apr 16, 2020 4:02 pm
by jtech
Updating and making proper use of that checkbox does keep the DELETE command from returning an error, and it says that it completes successfully. However, when I run the SELECT command again to verify, the data is all still there. Nothing was actually deleted.
Re: Bad Data Returned
Posted: Thu Apr 16, 2020 4:29 pm
by Cubert
It maybe a syntax issue then,
You said you executing the following;
Code: Select all
DELETE * FROM timeslips WHERE clientid='12';
Actually that will fail as you do not delete (*), execute this....
Code: Select all
DELETE FROM timeslips WHERE clientid='12';
Re: Bad Data Returned
Posted: Thu Apr 16, 2020 5:15 pm
by jtech
That did it. Thanks for the help!