Notification of User Entering New Record in Remote Database

Notification of User Entering New Record in Remote Database

am 02.10.2005 07:01:01 von Terrrrry

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!

Re: Notification of User Entering New Record in Remote Database

am 02.10.2005 17:28:34 von McKirahan

"Terrrrry" wrote in message
news:82C1D029-4403-4962-BBF5-BCFBEA33EACD@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@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("
ASPMail failure: " & 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

Re: Notification of User Entering New Record in Remote Database

am 03.10.2005 04:40:01 von Terrrrry

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


"McKirahan" wrote:

> "Terrrrry" wrote in message
> news:82C1D029-4403-4962-BBF5-BCFBEA33EACD@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@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("
ASPMail failure: " & 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
>
>
>