Advertisement

07.08.2008 at 01:38PM PDT, ID: 23548204
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.8

How to send an e-mail with CDOSYS in for notification of a database record update

Asked by GravitaZ24 in FrontPage-Expressions

Tags: ,

I am trying to figure out the right place to enter this code snippet to have it send the e-mail when the user hits "OK" and submits the record to an access database. I can get it to send the e-mail when the actual page is loaded, but not when it is needed (When the user actually submits the data).

<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="someone@somedomain.com"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
%>Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
<%
' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.
 
On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear
 
strErrorUrl = ""
 
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
	Err.Clear
 
	Set fp_conn =  Server.CreateObject("ADODB.Connection")
	FP_DumpError strErrorUrl, "Cannot create connection"
 
	Set fp_rs = Server.CreateObject("ADODB.Recordset")
	FP_DumpError strErrorUrl, "Cannot create record set"
 
	fp_conn.Open Application("LADBASE_ConnectionString")
	FP_DumpError strErrorUrl, "Cannot open database"
 
	fp_rs.Open "MainLATable", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
	FP_DumpError strErrorUrl, "Cannot open record set"
 
	fp_rs.AddNew
	FP_DumpError strErrorUrl, "Cannot add new record set to the database"
	Dim arFormFields0(12)
	Dim arFormDBFields0(12)
	Dim arFormValues0(12)
 
	arFormFields0(0) = "Problem"
	arFormDBFields0(0) = "Problem"
	arFormValues0(0) = Request("Problem")
	arFormFields0(1) = "Agmnt_No"
	arFormDBFields0(1) = "Agmnt_No"
	arFormValues0(1) = Request("Agmnt_No")
	arFormFields0(2) = "Control_Stmnt"
	arFormDBFields0(2) = "Control_Stmnt"
	arFormValues0(2) = Request("Control_Stmnt")
	arFormFields0(3) = "Date_update"
	arFormDBFields0(3) = "Date_update"
	arFormValues0(3) = Request("Date_update")
	arFormFields0(4) = "County"
	arFormDBFields0(4) = "County"
	arFormValues0(4) = Request("County")
	arFormFields0(5) = "Date_Resolved"
	arFormDBFields0(5) = "Date_Resolved"
	arFormValues0(5) = Request("Date_Resolved")
	arFormFields0(6) = "Rank"
	arFormDBFields0(6) = "Rank"
	arFormValues0(6) = Request("Rank")
	arFormFields0(7) = "GIS_Ref"
	arFormDBFields0(7) = "GIS_Ref"
	arFormValues0(7) = Request("GIS_Ref")
	arFormFields0(8) = "Date_Ini"
	arFormDBFields0(8) = "Date_Ini"
	arFormValues0(8) = Request("Date_Ini")
	arFormFields0(9) = "State"
	arFormDBFields0(9) = "State"
	arFormValues0(9) = Request("State")
	arFormFields0(10) = "Tract_Nos"
	arFormDBFields0(10) = "Tract_Nos"
	arFormValues0(10) = Request("Tract_Nos")
	arFormFields0(11) = "Mapper"
	arFormDBFields0(11) = "Mapper"
	arFormValues0(11) = Request("Mapper")
 
	FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0
 
 
	fp_rs.Update
	FP_DumpError strErrorUrl, "Cannot update the database"
 
	fp_rs.Close
	fp_conn.Close
 
	FP_FormConfirmation "text/html; charset=windows-1252",_
						"Form Confirmation",_
						"Thank you for submitting the following information:",_
						"submission_form.asp",_
						"Return to the form."
End If
End If
 
Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")
 
%>
<!--#include File='login.asa'-->
<%
    If Session(SiteID) <> true Then
        Response.Redirect("Login.asp?requester=submission_form.asp")
    End If
%>
 
 
<% Response.Buffer = True %>
 
<html>
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>MainLATable -- New</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
 
<body bgcolor="#FFFFFF">
 
<table width="100%" align=left>
  <tr>
    <td width="50%">
	  <b><font size=+3 color="#000080"> Submission Form </font></b>
	</td>
    <td width="50%" align=right>
      <table>
        <tr>
          <td>
		<a href="../results_page.asp" target="_top">Results Page</a> | 
Submission Form
 | <a href="database_editor.asp" target="_top">Database Editor</a> 
 
          </td>
        </tr>
      </table>
	</td>
  </tr>
</table>
 
 
<p>
<br clear="all">
<hr>
<p>
 
<form METHOD="POST" action="--WEBBOT-SELF--" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
 
<!--webbot bot="SaveDatabase" SuggestedExt="asp" S-DataConnection="LADBASE" S-RecordSource="MainLATable"  S-Form-Fields="Problem Agmnt_No Control_Stmnt Date_update County Date_Resolved Rank GIS_Ref Date_Ini State Tract_Nos Mapper" S-Form-DBFields="Problem Agmnt_No Control_Stmnt Date_update County Date_Resolved Rank GIS_Ref Date_Ini State Tract_Nos Mapper" U-ASP-Include-Url="../../../_fpclass/fpdbform.inc" startspan U-Database-URL="../../../fpdb/LADbase.mdb" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="../../../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan i-checksum="52631" -->
 
<p align="center"><br>
&nbsp;<b>Importance</b>&nbsp;
<select size="1" name="Rank">	<option value="H">H - High</option>
	<option value="M">M - Medium</option>
	<option value="L">L - Low</option>
</select>
<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; County</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--webbot bot="Validation" s-display-name="County" s-data-type="String" b-value-required="False" i-maximum-length="50" --> 
<input type="TEXT" name="County" size="38" value="" maxlength="50"><br>
</p>
<p align="center"><b>Mapper</b>&nbsp;
<select size="1" name="Mapper">	<option value="JEB">Jess Barnabei</option>
	<option value="CRD">Chris DeNardo</option>
	<option value="TJF">Tom Franczak</option>
</select>
<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
State</b>&nbsp;
<select size="1" name="State">	<option value="WVU">West Virginia</option>
	<option value="PA">Pennsylvania</option>
	<option value="VA">Virginia</option>
</select>
<br>
</p>
<p align="center"><br>
</p>
<p align="center"><b>GIS_Ref</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--webbot bot="Validation" s-display-name="GIS_Ref" s-data-type="String" b-value-required="False" i-maximum-length="50" --> 
<input type="TEXT" name="GIS_Ref" size="14" value="" maxlength="50"><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Agmnt_No</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--webbot bot="Validation" s-display-name="Agmnt_No" s-data-type="String" b-value-required="False" i-maximum-length="50" --> 
<input type="TEXT" name="Agmnt_No" size="29" value="" maxlength="50"><br>
</p>
<p align="center"><b>Tract_Nos</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--webbot bot="Validation" s-display-name="Tract_Nos" s-data-type="String" b-value-required="False" i-maximum-length="50" --> 
<input type="TEXT" name="Tract_Nos" size="19" value="" maxlength="50">&nbsp; <b>Control 
Statement</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--webbot bot="Validation" s-display-name="Control_Stmnt" s-data-type="String" b-value-required="False" i-maximum-length="50" --> 
<input type="TEXT" name="Control_Stmnt" size="33" value="" maxlength="50"></p>
<p align="center"><b>Problem</b><br>
</p>
<p align="center">&nbsp;&nbsp; <textarea rows="9" name="Problem" cols="56"></textarea><br>
</p>
<p align="center"><b>Date_Ini</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--webbot bot="Validation" s-display-name="Date_Ini" s-data-type="String" b-value-required="False" i-maximum-length="0" --> <input type="TEXT" name="Date_Ini" size="19" value="<%=Date%>">
<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Date_Resolved</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--webbot bot="Validation" s-display-name="Date_Resolved" s-data-type="String" b-value-required="False" i-maximum-length="0" --> 
<input type="TEXT" name="Date_Resolved" size="13" value="<%=Date%>"><b>&nbsp;&nbsp; Date_update</b><!--webbot bot="Validation" s-display-name="Date_update" s-data-type="String" b-value-required="False" i-maximum-length="0" --><input type="TEXT" name="Date_update" size="14" value="<%=Date%>"><br>
</p>
 
 
<p align="center"><input type="submit" value="    OK    "><input type="reset" value=" Reset "></p>
 
</form>
 
 
</body>
 
</html>
 
Loading Advertisement...
 
[+][-]07.09.2008 at 01:27AM PDT, ID: 21961486

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.09.2008 at 05:08AM PDT, ID: 21962619

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.09.2008 at 05:26AM PDT, ID: 21962753

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.09.2008 at 05:34AM PDT, ID: 21962811

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.09.2008 at 05:43AM PDT, ID: 21962893

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.09.2008 at 05:45AM PDT, ID: 21962913

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.09.2008 at 05:46AM PDT, ID: 21962919

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.09.2008 at 05:48AM PDT, ID: 21962939

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: FrontPage-Expressions
Tags: Frontpage, 2003
Sign Up Now!
Solution Provided By: cs97jjm3
Participating Experts: 1
Solution Grade: B
 
 
[+][-]07.09.2008 at 05:53AM PDT, ID: 21962973

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628