Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTs that passes parameters to asp page

Author  Topic 

KTL_DK
Starting Member

15 Posts

Posted - 2003-09-09 : 08:33:33
Hello ,

I need a dts that reads the data from a table , and with
this data navigate to a Url .
Example:

Execute sql task:
----------------------------------------
|select Id,name |
|from users |
----------------------------------------
||
|| On Success
||
ActiveX Script Task:
-----------------------------------------
Navigate to : |
http://net/a.asp?id=1&name=pete |
http://net/a.asp?id=2&name=bill |
-----------------------------------------

...
could someone tell me how to do this, or another way with Dts's that could work?
thanks,
Paul

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2003-09-09 : 08:34:53
Who's gonna close the browser window?

Jay White
{0}
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-09-09 : 08:46:34
Pff...

dim h
set h=createobject("microsoft.xmlhttp")
h.open "get", "http://net/a.asp?id=1&name=pete", 0
h.send
set h=nothing

I assume you need no to parse the web server answer.
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-09-09 : 09:03:11
Jay,

the browser is just one of many possible applications
that are able to exchange data on http protocol with
web servers.
The web server can't tell who namely send to him a
http request: a browser or a 'xmlhttp.request' object.
Go to Top of Page

KTL_DK
Starting Member

15 Posts

Posted - 2003-09-09 : 09:40:24
ok thank's ,
I don't need that the browser starts so the object that you refered
should work fine
Go to Top of Page

KTL_DK
Starting Member

15 Posts

Posted - 2003-09-09 : 09:47:34
I also don't have many experience in ActiveX Script Task, so i supose in order
to retrieve the severall rows from the table and make the get , i've got to establish
a connection and use a recordset to move trough the records. the syntaxe is symilar to vbscript isn't?
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-09-09 : 13:58:53
Exactly the same way!
Open recordset, retrieve required values, put them into
query string and send. Like this:

h.open "get", "http://net/a.asp?id=" & rs(0) & "&name=" & rs(1), 0
h.send
Go to Top of Page

KTL_DK
Starting Member

15 Posts

Posted - 2003-09-10 : 06:10:01
hello , now i have all the script done and it's working , so thanks for the help.
There is only one problem, when i run the script inside the dts , it works, but when i run the dts for example in a job it doesn't work.
The run dts interface(the weels moving) stay's working in a endless way.

thanks
Paulo
Go to Top of Page
   

- Advertisement -