Hi Experts,
I'm trying to read data from a sql table, and writing to a flat file(CSV file), for which I'm using Filesystem object. Getting error while writing data to the file on WriteLine method of the FSO object. But some data is being written to the file. But every time I get the error, different number of records were being written to the flat file. Not getting the error on same record every time. Any help pelase....
My code is
'*************************************
For j = 0 To Rs.RecordCount-1
For Each Field In Rs.Fields
If Data <> "" Then
Data = Data & "%" & Field.Value
Else
Data = Field.Value
End If
Next
objTxtStream.WriteLine Data
Data = ""
Rs.MoveNext
Next
'************************************
Error message is
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'objTxtStream.WriteLine'
/Survey_FilesDownload.asp, line 119
