December 6, 2004 at 7:38 am
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?
December 6, 2004 at 8:31 am
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
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy