error using STREAM.ReadText



Hi all. I need to import csv file stored on some http address to MS SQL 2000
DB.
I use VBScript:
-------------------------------------------------------------
set oHTTP = CreateObject("Microsoft.XMLHTTP")

set oStream = createobject("adodb.stream")
oStream.type = adTypeText
oStream.mode = adModeReadWrite
oStream.CharSet = "ISO-8859-1"

oHTTP.open "GET", strSource, False
oHTTP.send

oStream.open
oStream.WriteText oHTTP.responseText

oStream.Position = 2
str = oStream.ReadText -2 ' - GETTING ERROR HERE
-------------------------------------------------------------
I get error while try to get text line from Stream object.
Error msg:
TYPE MISTMACH: '[string: '''']'

whats wrong with this???


.



Relevant Pages

  • Re: get a textfile from website into memo
    ... HTTP Request like: ... 'Begin VBScript ... Dim oHttp ... Set oHttp = CreateObject ...
    (alt.comp.lang.borland-delphi)
  • Re: Recommended Approach
    ... Dan heres a vbscript that download a zip file from web, ... set oHTTP = WScript.CreateObject ... oStream.savetofile sDest, adSaveCreateOverWrite ...
    (microsoft.public.sqlserver.security)
  • Re: Using wininet over http to get a get.cgi file
    ... 'and save to sDest using ADO Stream ... set oHTTP = WScript.CreateObject ... set oStream = createobject ... Const adSaveCreateOverWrite = 2 ...
    (microsoft.public.inetsdk.programming.scripting.vbscript)
  • How to set a timeout on a send method?
    ... I have a vbscript that checks the stats of a web page on a ... server in my web farm and then act on that status. ... dim oHTTP ... set oHTTP = WScript.CreateObject ...
    (microsoft.public.scripting.vbscript)
  • How do I instanciate a MSXML2.XMLHTTP60 object?
    ... In My VBScript the following instruction creates a Microsoft.XMLHTTP ... Set oHTTP = WScript.CreateObject ... Set xml = New XMLHTTP60 ...
    (microsoft.public.scripting.vbscript)