Hi Keith:
This is Nick, I tested, this way seems still not working.
ListFeedURL = ActiveWorkSheetListFeedURL;
ListQuery lquery = new ListQuery(ListFeedURL);
lquery.setSpreadsheetQuery("mongooseCampaignCode = \"NICK TEST\"");
result = service.query(lquery, ListFeed.class);
see you after your vacation!
On Tuesday, May 1, 2012 12:51:51 PM UTC-4, Keith Andrew Hill wrote:
>
> The problem is the single quote. You need to use double quotes in the
> query. If you are using Java or C# you need to escape the quote character
> with a backslash: for example \".
>
> ListQuery query = new ListQuery(listFeedUrl);
> query.setSpreadsheetQuery("name =* \"John cena\" *and age > 25");
> ListFeed feed = service.query(query, ListFeed.class);
>
>
> On Tuesday, February 28, 2012 7:12:40 PM UTC-5, Mohammad Asif Jamaluddin
> wrote:
>>
>> I am trying to pass a query to a spreadsheet. I have a value say "John
>> cena". How do I pass it in the following line. I am getting an error while
>> doing so.
>>
>> ListQuery query = new ListQuery(listFeedUrl);
>> query.setSpreadsheetQuery("name = 'John cena' and age > 25");
>> ListFeed feed = service.query(query, ListFeed.class);
>>
>> Error is
>>
>> com.google.gdata.util.InvalidEntryException: Bad Request
>> Parse error: Invalid token encountered
>>
>> at
>> com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:594)
>> at
>> com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563)
>> at
>> com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:552)
>> at
>> com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:530)
>> at
>> com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535)
>> at com.google.gdata.client.Service.getFeed(Service.java:1135)
>> at com.google.gdata.client.Service.getFeed(Service.java:1077)
>> at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:662)
>> at com.google.gdata.client.Service.query(Service.java:1237)
>> at com.google.gdata.client.Service.query(Service.java:1178)
>>
>> pls help
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.