+ Start a Discussion

queryMore does not like the queryLocator string passed in Ruby


I am using Ruby interface to the SOAP API on Mac OS X.

Things are working pretty fine for me (Ruby 1.8.6, soap4r (1.5.8), activerecord-activesalesforce-adapter (2.0.0)).

For some reason though I cannot seem to get the queryMore to work for me.  See lines 44-46 here:


When I run this script I get the following:

$ ruby tst_query.rb
Account:  Fields = 106 Count = 556
#<SOAP::Mapping::Object:0x663f000>: INVALID_QUERY_LOCATOR: invalid query locator (SOAP::FaultError)

What am I missing?

I even tried this:
      qloc = resp.result.queryLocator
resp = obj.queryMore(QueryLocator.new(qloc))

But it says:

tst_query.rb:46: uninitialized constant QueryLocator (NameError)

Any suggestions?


- Shashank


You should do like this