 |
| 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
|
|
|
|

May 17th, 2006, 01:59 AM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

May 18th, 2006, 03:47 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

May 20th, 2006, 04:39 AM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

May 21st, 2006, 03:47 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

May 21st, 2006, 04:23 AM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

May 21st, 2006, 05:17 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

May 22nd, 2006, 12:49 AM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 201
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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???
|
|

May 22nd, 2006, 01:59 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
 |