Results 1 to 3 of 3

Thread: WebDav using ADO in VB 6.0

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    2

    WebDav using ADO in VB 6.0

    Hello,

    Thanks in advance for looking into this issue of mine and replying with your
    comments.

    We are trying to implement a service in our software that requires the
    capability to move files to and from a web server using WebDAV. Our software
    is written using VB 6.0.

    The following code is used to move local files to the web server folder
    using WebDAV.

    Dim objRecord As New adodb.Record
    Dim objStream As New adodb.Stream

    sFilename = sFileToUpload

    objRecord.Open sFilename, "URL=" & sDAVFolder, adModeReadWrite,
    adCreateOverwrite, , sUserName, sPassword

    objStream.Open objRecord, adModeReadWrite, adOpenStreamFromRecord

    objStream.Type = adTypeBinary

    objStream.LoadFromFile sFileToUpload

    objStream.Flush ' Update the record

    DoEvents


    objStream.Close
    objRecord.Close

    With the above code, I get the error below.

    Error (-2147012841):

    I don't get any error message. I tried to look up this error number. Did not
    find anything for this error code.

    Anybody has any idea about this error?

    Thanks.

  2. #2
    Addicted Member
    Join Date
    Oct 2004
    Location
    Clane, Ireland
    Posts
    179

    Re: WebDav using ADO in VB 6.0

    Have you looked at the ADODB errors.

    You can say
    Code:
    dim adoErr as ADODB.ERROR
    
    For each adoerr in Adodb.Errors
    .
    .
    .
    Next
    This may give you more info if it's an ADO error.

    HTH
    JP

    Please rate the postings

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    2

    Re: WebDav using ADO in VB 6.0

    ADO does not return any error message either.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width