Avatar of bfuchs
bfuchsFlag for United States of America asked on

Code getting Timeout expired

Hi experts,

I have the following code exporting some records to a web site.
                Set objHTTP = New WinHttp.WinHttpRequest
                'url = "https://c0aco743.caspio.com/rest/v2/tables/" & sTable & "/records"
                objHTTP.Open "POST", url, False
                objHTTP.SetRequestHeader "Accept", "application/json"
                objHTTP.SetRequestHeader "Content-Type", "application/json"
                objHTTP.SetRequestHeader "Authorization", "Bearer " + access_token
                    objHTTP.Send JsonConverter.ConvertToJson(patient)

Open in new window

Sometimes things are getting stuck and then code execution stops...
See attached error message, generated when executing last line.
Since there is not a problem with the data being sent, rather just a timing issue.
As next time I run the code for same data it works perfectly fine.
wondering what is the right approach for that?

.NET ProgrammingMicrosoft AccessVisual Basic Classic

Avatar of undefined
Last Comment

8/22/2022 - Mon
Daniel Pineault


I see they suggesting the following

Open in new window

But where should I apply that, must be after the send command, right?
However since code its getting stuck at the send command (see attached above), not sure how that will help me?
John Tsioumpris

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

Thank you my experts!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck