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 2005 Forums
 Transact-SQL (2005)
 hit a web page fromsql server

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-01-18 : 04:21:37
can I set in my stored procedure for the code to hit a webpage that I have created.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-01-18 : 04:32:57
Hit a webpage? What is that?
You mean you want to read a webpage with tsql code?
See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=111356


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-01-18 : 04:57:47
thanks - but it's not working
I get no error messages -hr is set to 0 but the page is not being hit (I know as I record when the page is hit)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 08:54:46
quote:
Originally posted by esthera

can I set in my stored procedure for the code to hit a webpage that I have created.


can you explain what you're trying to do? you can write webpage using any front end toll like ASP or ASP.NET. then on backend for saving/retrieving data you can write a procedure and call it from your page to pass data for saving or retrieve data to display.
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-01-18 : 09:03:08
I want to run an asp page when a stored procedure is run. is this possible?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 11:39:42
yup. its possible. you can call stored procedure from asp to retrieve data you want and display it in page.
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-01-18 : 11:50:45
no I want to do the opposite - in this case I want to hit a asp page from my stored procedure.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 11:55:42
quote:
Originally posted by esthera

no I want to do the opposite - in this case I want to hit a asp page from my stored procedure.


nope. hitting an asp page should be done from front end. can you explain your scenario a bit? when should the hit happen?
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-01-18 : 13:38:47
I need to hit a asp page to send an email to the user - im trying to set it up in sql server but I cannot - I cannot set up outlook on the machne and would like to just send from asp - is there anyway to hit a asp page?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2009-01-18 : 14:13:16
if you're using sql server 2005 or higher you can use Database mail which doesn't need outlook installed.
you only need to specify a SMTP server credentials.

___________________________________________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-01-18 : 14:18:53
Database mial is what I tried to do but it didn't work
do you have a link of something that works?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2009-01-18 : 14:21:21
what did you try?
this works fine for me:
http://www.mssqltips.com/tip.asp?tip=1100

___________________________________________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-01-18 : 14:40:53
thanks thats' what i did - but it's telling me it's qued but not sending it
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2009-01-18 : 15:01:41
ok so it's waiting to be sent. how long does it wait?
do you have any rows with errors in transmission_status column of the sys.transmission_queue dmv?

___________________________________________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-01-18 : 15:14:06
I checked - it's failed - I don't know why.
Is there anyway that I can just hit a asp page to just send the email?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2009-01-18 : 15:17:02
you can with some sp_OA* stored procedures hacking but i have to say than this is a very very bad way of even thinking of doing this.

___________________________________________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2009-01-18 : 15:23:41
is there any other alternative? I Need to send an email.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2009-01-18 : 15:38:11
no other regarding sql server.

___________________________________________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page
   

- Advertisement -