dbTalk Databases Forums  

error using STREAM.ReadText

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss error using STREAM.ReadText in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
gNM
 
Posts: n/a

Default error using STREAM.ReadText - 09-22-2006 , 02:17 AM






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???



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.