Bad Data Returned

Post Reply
jtech
Posts: 4
Joined: Thu Aug 23, 2018 9:09 pm

Bad Data Returned

Post 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';

User avatar
Cubert
Posts: 1559
Joined: Tue Dec 29, 2015 7:57 pm
Contact:

Re: Bad Data Returned

Post 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

jtech
Posts: 4
Joined: Thu Aug 23, 2018 9:09 pm

Re: Bad Data Returned

Post 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.

User avatar
Cubert
Posts: 1559
Joined: Tue Dec 29, 2015 7:57 pm
Contact:

Re: Bad Data Returned

Post 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';

jtech
Posts: 4
Joined: Thu Aug 23, 2018 9:09 pm

Re: Bad Data Returned

Post by jtech »

That did it. Thanks for the help!

Post Reply