ado recordset getstring method not working

  • Hi

    I am using ado (v2.6) recordsets in a DTS package in VbScript.  I have used recordsets loads of times before in VBA but I am new to them in vbscript.

     

    I have a function like this:

    Public Function exportRSToCSV(rs, strFilename)

    Dim fso

    Dim txtFile

    dim k

        Set fso = CreateObject("Scripting.FileSystemObject")

        Set txtFile = fso.CreateTextFile(strFilename, True)

        txtFile.Write (rs.GetString())

       

    End Function

    However when I run it I get the following error:

    Object doesnt support this property or method

    on the GetString line

    I have tried putting various variables in, e.g. the row and column delimiters, but nothing works.

    anyone any ideas why?

  • oops, figured it out.  in the code previous to this one I missed out a 'set' when I assigned the recordset to the variable.  so it didnt know it was a recordset.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply