![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
How are you running this, and which line is 13? I assume this will run unattended at some point, so it is bettrer to use "MSXML2.ServerXMLHTTP.4.0" instead of "Microsoft.XMLHTTP". -- Darren Green http://www.sqldts.com Groenewald" <noone (AT) paflof (DOT) com> wrote in message news:ct318c$iek$1 (AT) ctb-nnrp2 (DOT) saix.net... Ok this is what my script looks like: dim mInternet dim mFile dim mFiletxt Set mInternet= CreateObject("Microsoft.XMLHTTP" ) mInternet.open "GET" , "http://www.server.co.za/mserv.xls", false mInternet.send mFiletxt= mInternet.Responsetext set mInternet = nothing set mFileObj = createObject("scripting.FilesystemObject") set mfile = mfileObj.createtextfile("c:\mserv.xls") mfile.write mfiletxt mfile.close set mfile = nothing set mfileobj = nothing The error that I get when running it: Error: Invalid procedure call or argument Code: 800A0005 Line 13, Char 5 Help... Thanks alot "Rudi Groenewald" <noone (AT) paflof (DOT) com> wrote in message news:ct303j$gsn$1 (AT) ctb-nnrp2 (DOT) saix.net... Hi Darren, Thanks that works! ![]() "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:e6$TpxhAFHA.2112 (AT) TK2MSFTNGP14 (DOT) phx.gbl... Use some VBScript in a DTS package or a job. Something like this should do http://groups.google.co.uk/groups?hl...G P12.phx.gbl -- Darren Green http://www.sqldts.com "Rudi Groenewald" <noone (AT) paflof (DOT) com> wrote in message news:ct2ts5$d0p$1 (AT) ctb-nnrp2 (DOT) saix.net... Hi all, I think I'm going to ask the stupidest question there is but, I need to download a file daily from a website, it will always be the same filename, just different content. Now I can schedule a job to run on my server (SQL Server 2000) but what script do I use to tell the pc that it's gotta download an excel file to directory? I cannot use FTP unfortunately, then it would be easier, I can only download this file via HTTP I tried copy Http://www.server.co.za/file.xls c:\file\ But it tells me invalid device.... Doh... Could someone plz help me Thanks, R |
#2
| |||
| |||
|
|
Hi all, I am currently still looking for a solution to my problem, anyone have any ideas? This is how far I came: Hi Darren, Well, I am testing by just double clicking in windows, but when the script does what I want it to, it'll be running in a DTS task on sql server 2000. My script is: dim mInternet dim mFile dim mFiletxt Set mInternet= CreateObject("Microsoft.XMLHTTP" ) mInternet.open "GET" , "http://www.oilwatch.co.za/mserv.xls", false mInternet.send mFiletxt= mInternet.Responsetext set mInternet = nothing set mFileObj = createObject("scripting.FilesystemObject") set mfile = mfileObj.createtextfile("c:\mserv.txt") mfile.write mfiletxt mfile.close set mfile = nothing set mfileobj = nothing And line 13 will be at: mfile.write mfiletxt "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:OMLJ6PiAFHA.2572 (AT) tk2msftngp13 (DOT) phx.gbl... How are you running this, and which line is 13? I assume this will run unattended at some point, so it is bettrer to use "MSXML2.ServerXMLHTTP.4.0" instead of "Microsoft.XMLHTTP". -- Darren Green http://www.sqldts.com Groenewald" <noone (AT) paflof (DOT) com> wrote in message news:ct318c$iek$1 (AT) ctb-nnrp2 (DOT) saix.net... Ok this is what my script looks like: dim mInternet dim mFile dim mFiletxt Set mInternet= CreateObject("Microsoft.XMLHTTP" ) mInternet.open "GET" , "http://www.server.co.za/mserv.xls", false mInternet.send mFiletxt= mInternet.Responsetext set mInternet = nothing set mFileObj = createObject("scripting.FilesystemObject") set mfile = mfileObj.createtextfile("c:\mserv.xls") mfile.write mfiletxt mfile.close set mfile = nothing set mfileobj = nothing The error that I get when running it: Error: Invalid procedure call or argument Code: 800A0005 Line 13, Char 5 Help... Thanks alot "Rudi Groenewald" <noone (AT) paflof (DOT) com> wrote in message news:ct303j$gsn$1 (AT) ctb-nnrp2 (DOT) saix.net... Hi Darren, Thanks that works! ![]() "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:e6$TpxhAFHA.2112 (AT) TK2MSFTNGP14 (DOT) phx.gbl... Use some VBScript in a DTS package or a job. Something like this should do http://groups.google.co.uk/groups?hl...G P12.phx.gbl -- Darren Green http://www.sqldts.com "Rudi Groenewald" <noone (AT) paflof (DOT) com> wrote in message news:ct2ts5$d0p$1 (AT) ctb-nnrp2 (DOT) saix.net... Hi all, I think I'm going to ask the stupidest question there is but, I need to download a file daily from a website, it will always be the same filename, just different content. Now I can schedule a job to run on my server (SQL Server 2000) but what script do I use to tell the pc that it's gotta download an excel file to directory? I cannot use FTP unfortunately, then it would be easier, I can only download this file via HTTP I tried copy Http://www.server.co.za/file.xls c:\file\ But it tells me invalid device.... Doh... Could someone plz help me Thanks, R |
![]() |
| Thread Tools | |
| Display Modes | |
| |