Internet Transfer Control, only option?

J

John

Hi

Is itc the only option if one needs to post to a web site from within
access? I am looking for something better if there is such a thing.

Thanks

Regards
 
J

John

Thanks for that. I have searched but have not found an example to post to a
url from behind an isa 2000 server. Any idea where I can find an example?

Thanks

Regards
 
J

John

This is all .net stuff and none of it relates to vba/access as far as I can
see.

Regards
 
R

Rick Brandt

John said:
This is all .net stuff and none of it relates to vba/access as far as
I can see.

You can use the MSXML.dll library to make an HTTP POST or GET request. Is that
what you're talking about? I use that to send data transfers from an Access app
to a java servlet but it should work for any URL.
 
J

John

I just need to post some data to a url. Are there any code examples
somewhere?

Thanks

Regards
 
R

Rick Brandt

John said:
I just need to post some data to a url. Are there any code examples
somewhere?


Dim oHttpPost As Object
Dim POSTData As String

Set oHttpPost = CreateObject("Microsoft.XMLHTTP")
oHttpPost.Open "POST", "Your URL", False
oHttpPost.setRequestHeader "Content-Type",
"application/x-www-form-urlencoded"

POSTData = "RequestType=SAMPLE_POST" & _
"&Field1= " & Variable1 & _
"&Field2=" & Variable2 & _
"&Field3=" & Variable3 & _
"&Field4=" & Variable4 & _
"&Field5=" & Variable5

oHttpPost.Send (POSTData )
 
J

John

Hi Rick

Many thanks for that. Any way to get the return data from site (itc
equivalent GetChunk) and any error code (itc ResponseCode)?

Thanks

Regards
 
R

Rick Brandt

John said:
Hi Rick

Many thanks for that. Any way to get the return data from site (itc
equivalent GetChunk) and any error code (itc ResponseCode)?

The object will have a Status responseText properties that you can read
after the "Send".

If oHttpPost.Status < 300 Then 'Response is OK
someStringVariable = oHttpPost.responseText
 
J

John

Hi Rick

Thanks for this. Very useful and all works fine. One last thing, is there a
way to add a proxy server's information somewhere ie for when making calls
from behind an isa server?

Thanks

Regards
 
R

Rick Brandt

John said:
Hi Rick

Thanks for this. Very useful and all works fine. One last thing, is
there a way to add a proxy server's information somewhere ie for when
making calls from behind an isa server?

Sorry, I don't know the answer to that.
 
A

Alex Dybenko

Hi John,
AFAIK - XMLHTTP uses IE settings for proxy server. so you try to change
there.
 
Top