Mike,
I found the following code which appears to solve my problem but I am
getting a type mismatch error at the Response.Write(ParseBody(strBody)) line.
Here is the code:
**********************************************
<html>
<head>
<%
Function ParseBody(strText)
strText = Replace(strText, Chr(13), "<br>")
ParseBody = strText
End Function
Dim myConnString
Dim myConnection
Dim mySQL
myConnString = Application("Sample_ConnectionString")
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.Open myConnString
mySQL= "INSERT INTO Employees "
mySQL= mySQL & "(FirstName,LastName,Address,City,Region,PostalCode) "
mySQL= mySQL & "VALUES ('" & Request.Form("FirstName") & "','"
mySQL= mySQL & Request.Form("LastName") & "'"
mySQL= mySQL & ",'" & Request.Form("Address") & "'"
mySQL= mySQL & ",'" & Request.Form("City") & "','"
mySQL= mySQL & Request.Form("Region") & "','"
mySQL= mySQL & Request.Form("PostalCode") & "')"
myConnection.Execute mySQL
myConnection.Close
Set myConnection = Nothing
Dim myCDONTSMail
Dim strFrom
Dim strTo
Dim strSubject
Dim strBody
strFrom="(e-mail address removed)"
strTo=Request.Form("EMail")
strSubject = "Send to E-mail and Database"
strBody ="The following information was submitted:" & Chr(13)
strBody = strBody & Request.Form("FirstName") & " "
strBody = strBody & Request.Form("LastName")
strBody = strBody & Chr(13) & Request.Form("Address") & Chr(13)
strBody = strBody & Request.Form("City") & Chr(13)
strBody = strBody & Request.Form("Region") & Chr(13)
strBody = strBody & Request.Form("PostalCode") & Chr(13)
strBody = strBody & Chr(13) & "Thank you for submitting your data."
Set myCDONTSMail = CreateObject("CDONTS.NewMail")
myCDONTSMail.Send strFrom,strTo,strSubject,strBody
Set myCDONTSMail = Nothing
%>
</head>
<body bgcolor="#FFCC99">
<p><font face="Verdana" color="#FF0000"><b>Thank you for submitting your
information!<br>
</b></font><font face="Verdana" size="2">You will receive an e-mail
shortly. The e-mail was sent using the following information:</font></p>
<b><b><font face="Verdana" size="2">Sent To: <br>
<%
Response.Write Request.Form("EMail")
%>
From: Microsoft PSS Sample Page</font></b></p>
<p><b><font face="Verdana" size="2">Subject: Send to Database and
E-mail</font></b></p>
<p><b><font face="Verdana" size="2">Content:
<%
Response.Write(ParseBody(strBody))
%>
</font></b></p>
<hr noshade size="1" style="color: #000000">
<p> </p>
</body>
</html>
************************************************