Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asptoday_discuss thread: Pulling Data dynamically from the internet


Message #1 by "Bill Cohen" <billcohen@h...> on Thu, 6 Dec 2001 19:47:09
Does anyone know if there is a way to pull information from a web site by 

via a separate application.  What I am trying to do is create a database 

from information that is posted on a financial site.



Thanks-
Message #2 by "Jason Salas" <jason@k...> on Fri, 7 Dec 2001 20:38:00 +1000
You might be able to pull this off...pulling data from a  remote site...by

writing a single script using VBScript's XMLHTTP object, which would perform

a "screen scrape"...and then use a regular expression to search for a

specific bit of data (like you could have it extract the current close price

from NYSE.COM of certain securities), to save a fragment of data to a single

variable.  You could then INSERT the data into your DB application.



HTH,

Jason









----- Original Message -----

From: "Bill Cohen" <billcohen@h...>

To: "ASPToday Discuss" <asptoday_discuss@p...>

Sent: Thursday, December 06, 2001 7:47 PM

Subject: [asptoday_discuss] Pulling Data dynamically from the internet





> Does anyone know if there is a way to pull information from a web site by

> via a separate application.  What I am trying to do is create a database

> from information that is posted on a financial site.

>

> Thanks-

>





Message #3 by Subha Gowri <subha@i...> on Fri, 7 Dec 2001 19:32:13 +0530
Hi,



Have you ever used pipeline components/Micropipe components in commerce

server?



If you are, can u please send me the steps to do the same?



Thanks in advance,

Subha





Note : I tried the following using Micropipe components. But i'm getting the

following error while executing the pipeline:



---------------------------------------

ERROR--------------------------------------------------------------------

Commerce.MicroPipe error '80004005' 

Commerce MicroPipeline: Execution failed for component [hr=0x80004005, Error

Level=0x3] Dictionary error: Value for key 'yyy@i...' in dictionary

'<unknown>' missing (expected a variant of type 8) 

/ewiedevelopment/email.asp, line 37 



---------------------------------------SOURCE

CODE--------------------------------------------------------------------



dim dOrder

dim dContext

dim dConfig		



'Create order, context and configuration dictionaries

set dConfig = server.createObject("commerce.dictionary")



'Set Values in the configuration dictionary 

dconfig("from") = "xxx@y..."

dconfig("SMTPHost") = "xxx.yy.zz.aa"

dconfig("toField") = "yyy@i..."

dconfig("subjectfield") = "Order Confirmation"

dconfig("bodyfield") = "Details of order will be present here"

dconfig("bodytype") = 1



set pSMTP = server.CreateObject("commerce.SendSMTP")

'Create an instance of Micropipe object

set oMicropipe = server.createObject("commerce.micropipe")



pSMTP.Setconfigdata dconfig

	

'Tell the micropipe to run which component and run it.

oMicropipe.setComponent pSMTP



Set dOrder = server.createObject("commerce.dictionary")

'set values in the order dictionary

dorder("order_id") = "1025"



set dContext = server.createObject("commerce.dictionary")



'Create an instance of sendSMTP pipeline component

'---------------------------------------------------------------------------

------------------------------

errval = oMicropipe.execute(dOrder,dContext,0)    // this line is giving the

error - lineno : 37

if Err.Number <> 0 then

	response.write("Error in creation!!!")

else

	response.write("errvalue generated")

End if



set dorder = Nothing

set dContext = Nothing

set dConfig = Nothing

set pSMTP = Nothing

set oMicropipe = Nothing



%>



---------------------------------------END

SOURCE--------------------------------------------------------------------




  Return to Index