Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WinHttpRequest - need to PUT without streams

Status
Not open for further replies.

neilbmclaughlin

Programmer
Sep 30, 2002
1
0
0
GB
I need to write a VB routine to put a binary file from an ActiveX running on a client to a WebDAV location using HTTP PUT but I can't use ADO streams. What I need to do is along the lines of:

<SNIP>
Private objHTTP As New WinHttp.WinHttpRequest

Dim lData() As Byte

Open strDestFilePath For Binary As #1
Put #1, , lData()
Close #1

objHTTP.Open &quot;PUT&quot;, strURL, False
objHTTP.SetCredentials &quot;test&quot;, &quot;test&quot;, 1
objHTTP.Send (lData)
<SNIP>

But the objHTTP.Send doesn't seem to accept byte as a
parameter.

Has anyone got any suggestions as to what I'm doing wrong?

Thanks in advance.

Neil McLaughlin
.

 
Because you want to move a file form local to internet destination consider hear are some options you can use
1. MS internet controls
2. HTML control
3. Shell and use a Batch/scriptfile utilizing built in ftp functionality
4. DTS depending on version has ftp built in
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top