Help Please, need to pass arguments to a URL using SQL Server Job

Help Please, need to pass arguments to a URL using SQL Server Job

Post by J R Hendric » Tue, 25 Dec 2001 06:23:34



Greetings,

I need to be able to pass arguments to a WEB site using a SQL Server
Job.  The web site creator has given me the address and arguments, and
suggested that I should use a SQL Server Job to automate hitting the
URL. Other information is being transferred to the site from SQL.

The whole purpose is to be able to hit the site and process on a
schedule rather than having a user manually hit the site through a
browser, enter the information and click a process buton.

Any suggestions and help would be appreciated.  Thanks in advance for
any assistance and direction.

J. R.

 
 
 

Help Please, need to pass arguments to a URL using SQL Server Job

Post by Narayana Vyas Kondredd » Thu, 27 Dec 2001 00:34:32


J.R, since nobody replied, I am taking a stab at it.

You could write a program (EXE) in VB or VC (VB is much easier and
hardly takes 5 minutes for this) using Microsoft Web Browser control.
This EXE should accept command line parameters, so that you can pass the
arguments required for the URL. You will have to schedule a CMDExec job
in SQL Server that calls this EXE with required parameters. This EXE
inturn constructs the URL and calls it using Navigate2 method. Just exit
out of the EXE in the NavigateComplete2 event.

It'll be great if you can use the Winsock library instead of Web Browser
control.

I'm wondering if there's an easier way, that I am missing. Do let me
know if you figure some elegant solution out.
--
HTH,
Vyas
SQL Server FAQ, articles, code samples,

http://vyaskn.tripod.com/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

1. Help Please, need to pass arguments to a URL using SQL Server Job

Vyas,

Thanks for the code and the help.  I just have one further question (for
now at least).

When I attach the URL parameter to "CallURL.exe" do I enclose it in
quotes (due to the length of the URL string).  Something like this:
CallURL.exe "URL String To Pass"

As luck would have it, the URL site has a problem this morning.

Thanks for all your assistance.

J. R.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

2. ODBC

3. SQL Server 2000--Accessing SQL Server Using a URL

4. Req: using showplan on stored procedure

5. passing url parameters to SQL Server

6. Design and New table and query

7. Passing a Clob argument to a stored procedure from Java using JDBC

8. Transaction Logging

9. Automatic SQL Server Restart caused job not to run--PLEASE HELP

10. Need help with query using SQL please

11. sql server scheduled job help please

12. Counting arguments passed to SQL or PL/SQL?

13. help with stored procedure and passing arguments to SELECT