Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 17th, 2006, 01:59 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default writing web service

Hello all
Is there any one can introduce me a cool link for writing a web service for sending mail every weak? this e-mail is contained the records that were odified or inserted during the last week.I would be thankfull if some one tell me i choose the correct way to do this or no(i mean wrting web service)
Thank you

 
Old May 18th, 2006, 03:47 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi hastikeyvan,

A Web service is probably not a good solution for this task, as you need another process to trigger the service at certain intervals

You're probably better off writing a Windows Service, or, and much easier, write a simple console application that you can schedule through Window's scheduled tasks feature. Not as cool as a Windows Service, but way easier to develop and maintain.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old May 20th, 2006, 04:39 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

Hello Imar
can i use a console application for sending e-mail that contains the database datas that has uploaded to web?if it is possible would you please giude me?i don't have any idea of how can i do it.it would be very good if there is a link that i can get help from it.
thank you Imar


 
Old May 21st, 2006, 03:47 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

For .NET, in many ways, writing a console app is not different than writing a web or a Windows forms application. So, if you know how to access a database through ADO and know how to send an e-mail then you're good to go.

I sort of assumed you were talking about .NET (because of the web services), but that may not be the case. What platform do you need to run this scheduled task on? There may be other ways to do this as well....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old May 21st, 2006, 04:23 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

Hi Imar
So I will access to my database and then just write an e-mail program for recordset that has come from database.but there is one more thing.how can i active such program once a week?for example the first mail should be sent on May-21-2005 and the other one May-28-2005 and so on.(the records tat has changed during a week will be save in a table and this table will be delete after sending mail)
thank you

 
Old May 21st, 2006, 05:17 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
quote:how can i active such program once a week?
That depends on the solution you're going to develop.

If you are going to build a .NET console application, or a simple VBScript, you can use the Windows Task scheduler, as I mentioned in my previous e-mail. Other solutions bring other scheduling possibilities (e.g. you could build something like this in SQL Server directly).

So I guess it all depends on the OS / platform and other technologies you have available...

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old May 22nd, 2006, 12:49 AM
Friend of Wrox
 
Join Date: May 2005
Location: tehran, tehran, Iran.
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to hastikeyvan
Default

Hello Imar
I want to use window platform.and write an e-mail program in .net but i have problem with make this e-mail program active every week.how can i active this sending mail every week????Can I put and if statement that compare the date and after that active send.mail???


 
Old May 22nd, 2006, 01:59 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I am starting to sound like a broken record, but you can the Windows Task scheduler. This is a Windows component that allows you to schedule programs. You find it under the Windows Control Panel.

The program itself should then query the database for relevant records. Again, how you do this depends largely on the technology. Basically you need a SQL query with a WHERE clause that filters out the relevant records. If you are using SQL Server, look in the Books Online for functions like GetDate and DateAdd for date calculations.

You'll need some knowledge about ADO.NET (for accessing the database), T-SQL (for querying the database) and some .NET knowledge in general (for program logic and sending out the e-mail).

HtH,

Imar




Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Service Consuming another web service CraigWhitfield EJB 0 January 10th, 2008 08:38 AM
Web Service ankesh13 ADO.NET 1 March 8th, 2007 11:12 AM
web service windows_mss ASP.NET 2.0 Professional 0 January 29th, 2007 12:54 AM
Error to Add Web Reference from a Web service jdjbarrios ASP.NET 2.0 Professional 0 July 18th, 2006 02:58 PM
Service Oriented Web Service aldwinenriquez .NET Web Services 2 September 15th, 2005 03:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.