Start a new topic

Query results from Delphi XE6


I'm not sure which category this question would be best in, hence the post in General Discussion.

I'm trying to query my users table from a VCL application in Delphi XE6 using the TBackendUsers component.

The parameters to pass are a String Array for the query and a JSONArray for the results.

Whatever I put in the String Array, the query function just returns all users as a result.

I'm trying to get the following to work:

?query={ "group_id": "VALUE" }&fields=username, group_id

(Queries the user table for any user with my passed group_id and only returns the username and group_id of matches).

Any help is appreciated.


Hey there Cwebster95! I'd like to try and isolate whether it's an issue with the Delphi library you're using or with the contnet being sent. You could try making a REST request through the API console.

Are you following this tutorial?
Hi Caroline, thanks for the reply!

I have followed that tutorial in the past, although I have my remote push notifications working now.

The reason I am trying to get a query to work is to be able to view data about a group of users within a VCL application on windows rather than the Kinvey console users table. Currently, I'm sending the query from a TBackendUsers component using a function: TBackendUsers.Users.QueryUsers(Query - String Array, Result - JSON Array).

Are you recommending testing the same query through the console and seeing what results I get?

Second Edit:

When I use a function QueryUserName from the same component, I get valid results (the correct user back every-time), and when I use my custom endpoints to query from certain user groups they work fine; it seems the problem is with the query passed as a string array. I am entering the query as above - how I would on Kinvey itself; is there anything that could change from me passing it to Kinvey executing it?

Hey, just saw your edits, that'll help us troubleshoot, thanks!
So yes, you should try the query through the API console to try and rule that out-- but it sounds like you may actually be having issues with the way the Delphi library does things, in which case we can't help, since we didn't author the library. That's exactly where the library code lies, in between your use of it and the command reaching Kinvey.
Thanks again for your replies Caroline,

I've investigated the call stack in Delphi and nothing seems to change in the query.

I'm just wondering if there could be any problem with it being passed from outside of Kinvey.

Both TBackendUsers and TBackendQuery respond the same through different functions.

No matter what query I enter, it returns every record, meaning it accesses the correct are of Kinvey, but the query once at Kinvey doesn't get executed?

Many Thanks,

Hey Cwebster, I just wanted to let you know that we're still digging in on this. We plan on chatting with the library author to see if we can collaborate on it, especially since it seems like there are a fair number of users using the Delphi library. Sorry for the delay and thanks for your patience!
Hi, any news on this specific post?
Login or Signup to post a comment