Problem with Google Query Lannguage

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Problem with Google Query Lannguage

Post by Simon » Wed Oct 01, 2014 8:16 pm

Hi teacherguy,
Actually with your exact code I get the same
result empty
it OK

But

Code: Select all

   put URL wholeURL into temp
  -- set the sockettimeoutinterval to 1000 ---if you have to use this I believe it goes before the get/put
   answer the result
   put temp
does return the info you want.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: Problem with Google Query Lannguage

Post by teacherguy » Wed Oct 01, 2014 8:29 pm

Simon,

When I place the sockettimeoutinterval prior I get a 443 timeout no matter what. :(

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Problem with Google Query Lannguage

Post by Simon » Wed Oct 01, 2014 8:31 pm

But what about using put???
Did that work for you?

Simon
Edit: the commented line actually had nothing to do with the post :)
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: Problem with Google Query Lannguage

Post by teacherguy » Wed Oct 01, 2014 8:37 pm

Simon wrote:But what about using put???
Did that work for you?

Simon
Edit: the commented line actually had nothing to do with the post :)
With this code:

Code: Select all

on mouseUp
   put "https://docs.google.com/spreadsheets/d/" into downloadFirstHalf
   put "1kzVH1Nv9K3tuZCTyIs6BPbGT-wycs8aIRlhLdz5ZCpk" into downloadKey
   put "/gviz/tq?tqx=out:json&tq=select+A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS+order+by+A+desc" into downloadSecondHalf
   put downloadFirstHalf&downloadKey&downloadSecondHalf into wholeURL
   libURLSetSSLVerification false 
   put URL wholeURL into temp
   answer the result
   put temp
end mouseUp
I get this result:

socket timeout docs.google.com:443|6978

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Problem with Google Query Lannguage

Post by Simon » Wed Oct 01, 2014 8:47 pm

Leave the socketTimeout in if you need it.

Just saying that I received the same results as you
result empty
it OK
until I used the put.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Problem with Google Query Lannguage

Post by Simon » Wed Oct 01, 2014 8:52 pm

OK it's the "it" variable getting scrambled;

Code: Select all

 on mouseUp
   put "https://docs.google.com/spreadsheets/d/" into downloadFirstHalf
   put "1kzVH1Nv9K3tuZCTyIs6BPbGT-wycs8aIRlhLdz5ZCpk" into downloadKey
   put "/gviz/tq?tqx=out:json&tq=select+A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS+order+by+A+desc" into downloadSecondHalf
   put downloadFirstHalf&downloadKey&downloadSecondHalf into wholeURL
   libURLSetSSLVerification false 
   get URL wholeURL
   put it 
   set the sockettimeoutinterval to 1000
   answer the result
end mouseUp
Works here.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: Problem with Google Query Lannguage

Post by teacherguy » Wed Oct 01, 2014 9:59 pm

Was on my way home and just tried your suggestion. Worked perfectly. Hopefully it will work tomorrow at school.

Thank you for taking the time, I truly appreciate it!

teacherguy
Posts: 379
Joined: Thu Dec 08, 2011 2:43 am

Re: Problem with Google Query Lannguage

Post by teacherguy » Thu Oct 02, 2014 12:42 pm

At school I am back to the same issues: I get a timeout if I don't use the "set the sockettimeoutinterval" but when I do use it I either get nothing for "it" or I get the word "OK" (or empty)

Well, I guess we've narrowed the issue to my network?

Post Reply