Notification of User Entering New Record in Remote Database

Does anyone know how I can set up up something that would automatically
generate a message or alert to notify me that a new entry has been added to
guestbook which I have developed in ASP on my website? The records are held
in an Access table. I have already developed an administrator page which
allows me to open up the records in the table but instead of doing this each
day, I'd like to be notified if a new record has been added... since it isn't
very often!
Thanks if you can help!
Terrrrry [ So, 02 Oktober 2005 07:01 ] [ ID #993736 ]

Re: Notification of User Entering New Record in Remote Database

"Terrrrry" <Terrrrry [at] discussions.microsoft.com> wrote in message
news:82C1D029-4403-4962-BBF5-BCFBEA33EACD [at] microsoft.com...
> Does anyone know how I can set up up something that would automatically
> generate a message or alert to notify me that a new entry has been added
to
> guestbook which I have developed in ASP on my website? The records are
held
> in an Access table. I have already developed an administrator page which
> allows me to open up the records in the table but instead of doing this
each
> day, I'd like to be notified if a new record has been added... since it
isn't
> very often!
> Thanks if you can help!

How do you want to be notified -- by e-mail?

Does your Web host support ASPMail (or CDO)?

Just add a Sub that sends an e-mail and call it from the
Sub that adds the Gustbook entry.

Something like this? Watch for word-wrap.

Call Send_Email()

Sub Send_Email()
On Error Resume Next
Const cADD = "you [at] email.com"
Const cNAM = "Your Name"
Const cHST = "123.123.123.123"
Dim objPMS
Set objPMS = Server.CreateObject("Persits.MailSender")
objPMS.AddAddress cADD, cNAM
objPMS.Host = cHST
objPMS.From = cADD
objPMS.FromName = cNAM
objPMS.Subject = "Guestbook"
objPMS.Body = "A Guestbook entry has been added."
objPMS.Send
If Err <> 0 Then
Response.Write("<br><b>ASPMail failure: </b>" & Err.Description)
Response.End
End If
Set objPMS = Nothing
End Sub

Basically, you're sending an e-mail to yourself.
Of course you could pass in the Guest's name
and other information.

Change the 3 constants to your values.

If you might test this locally then you could add the following
at the top of the Sub:

If Request.ServerVariables("HTTP_HOST") = "localhost"
Then Exit Sub
End If
McKirahan [ So, 02 Oktober 2005 17:28 ] [ ID #993738 ]

Re: Notification of User Entering New Record in Remote Database

Thankyou. I'll give it a try.
--
....Hey, I''m only as smart as my friends!


"McKirahan" wrote:

> "Terrrrry" <Terrrrry [at] discussions.microsoft.com> wrote in message
> news:82C1D029-4403-4962-BBF5-BCFBEA33EACD [at] microsoft.com...
> > Does anyone know how I can set up up something that would automatically
> > generate a message or alert to notify me that a new entry has been added
> to
> > guestbook which I have developed in ASP on my website? The records are
> held
> > in an Access table. I have already developed an administrator page which
> > allows me to open up the records in the table but instead of doing this
> each
> > day, I'd like to be notified if a new record has been added... since it
> isn't
> > very often!
> > Thanks if you can help!
>
> How do you want to be notified -- by e-mail?
>
> Does your Web host support ASPMail (or CDO)?
>
> Just add a Sub that sends an e-mail and call it from the
> Sub that adds the Gustbook entry.
>
> Something like this? Watch for word-wrap.
>
> Call Send_Email()
>
> Sub Send_Email()
> On Error Resume Next
> Const cADD = "you [at] email.com"
> Const cNAM = "Your Name"
> Const cHST = "123.123.123.123"
> Dim objPMS
> Set objPMS = Server.CreateObject("Persits.MailSender")
> objPMS.AddAddress cADD, cNAM
> objPMS.Host = cHST
> objPMS.From = cADD
> objPMS.FromName = cNAM
> objPMS.Subject = "Guestbook"
> objPMS.Body = "A Guestbook entry has been added."
> objPMS.Send
> If Err <> 0 Then
> Response.Write("<br><b>ASPMail failure: </b>" & Err.Description)
> Response.End
> End If
> Set objPMS = Nothing
> End Sub
>
> Basically, you're sending an e-mail to yourself.
> Of course you could pass in the Guest's name
> and other information.
>
> Change the 3 constants to your values.
>
> If you might test this locally then you could add the following
> at the top of the Sub:
>
> If Request.ServerVariables("HTTP_HOST") = "localhost"
> Then Exit Sub
> End If
>
>
>
Terrrrry [ Mo, 03 Oktober 2005 04:40 ] [ ID #995041 ]
Webserver » microsoft.public.inetserver.asp.db » Notification of User Entering New Record in Remote Database

Vorheriges Thema: update from using ms access query
Nächstes Thema: Form data to SQL statement