navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Appending text to a memo field.

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Appending text to a memo field.
Page: [1]
 
and13345

 

Posts: 99
Joined: 10/7/2003
Status: offline

 
Appending text to a memo field. - 12/16/2003 0:13:59   
I trying to create a history of changes to my records in my database. What I would like to do is take a memo field (or any field type) and with each change to a specific record that field is appended to with the time and date the change was submitted. So if the record was updated 6 times there would be 6 entries in the field. I would also like to attach the users Windows Domain login ID being used if that is possible.

Can this be done?
rdouglass

 

Posts: 9270
From: Biddeford, ME USA
Status: offline

 
RE: Appending text to a memo field. - 12/16/2003 8:29:05   
You could use a query something like:

"UPDATE myTable SET (myMemoField = '" & Request.Form("myMemoField") & CHR(013) & Now() & CHR(013) & Request.Form("myFormField") & "') WHERE RecordID = " & Request.Form("RecordID")

It is probably not exactly what you need but just an example of doing it in the UPDATE query. That would take the original text (in a hidden field 'myMemoField') put a CR in then the Time/Date stamp, then another CR then the text in 'myFormField' and write it back to the memo field.

Make sense? Hope it helps...

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to and13345)
and13345

 

Posts: 99
Joined: 10/7/2003
Status: offline

 
RE: Appending text to a memo field. - 12/16/2003 9:03:00   
That sounds like what I am looking for. Is there any way to add the users NT Domain ID? What I am looking for is not only the timestamp, but the ID of the person making the change. Not sure if those values can be gotten?

Thanks for the start!!!

(in reply to rdouglass)
Spooky

 

Posts: 26603
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Appending text to a memo field. - 12/16/2003 18:00:33   
Assuming the web is authenticated, you can use the code :

<%=Request.Servervariables("LOGON_USER")%> to get the current user.

Try that code on a seperate asp page to test it first.

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to and13345)
and13345

 

Posts: 99
Joined: 10/7/2003
Status: offline

 
RE: Appending text to a memo field. - 12/17/2003 23:36:05   
Yep, that works.

Thanks!!

(in reply to Spooky)
cdrees

 

Posts: 42
Joined: 8/4/2004
Status: offline

 
RE: Appending text to a memo field. - 9/14/2004 15:05:41   
I thought this would be a good place to jump in, since your example works for me too! (kind of).

I have a notes field, that is text. I'd like to time stamp each entry made to that field, to keep a history of text added.

By using the above example, it takes the existing contents of the notes field, copies it and adds the time stamp, and writes is back. That is in effect doubling the size of the notes field each time.. (say there are 50 lines text and I add one more, 51 lines get added on top of the original 50 that are there....)


Any thoughts of how to have it write just the current entry and time stamp just the current entry?


-Chris

(in reply to and13345)
and13345

 

Posts: 99
Joined: 10/7/2003
Status: offline

 
RE: Appending text to a memo field. - 9/14/2004 15:45:00   
What I do is take the contents of the DB field and add a time stamp to the beginning of it. That gives me a form field that contains the previous value in the DB with a new time stamp at the beginning. When I finish with the changes on the form and click the update button it then writes back to the db record and overwrites what was there previously with the newly modified value. So the contents are never doubled just appended. I have another form where I have a field that is where I add my comments. I have a hidden field that I bring in the previous comments from the db. When I click update it takes the hidden filed and adds my comments from the form comments field and adds the current time and date to the beginning of that. My update ASP page takes the three pieces and generates a new variable which is used as the value in my UPDATE SQL.

Does that help?

(in reply to cdrees)
cdrees

 

Posts: 42
Joined: 8/4/2004
Status: offline

 
RE: Appending text to a memo field. - 9/14/2004 16:24:37   
that does help, and that's probably a good way to do it... I've been talking with a few others in the office, and we've come up with some functionality that kinda takes the place of the time stamping... but adds a number of new twists:

The database is basically used for tracking applications we need to package, where they are in the process (current status), who's assigned to it, notes, dependencies, etc.

We'd like to have the web front end capture into a history field every time a status changes. Currently, we have the following status types:

New
Information Gathering
Complete
Exceptions
Hold
Packaging
Packaging Complete
Application Object Testing
UAT Testing
Retired
Testing
Testing Complete


I like the database editor page be able to know when a status changes, and if there is currently no date in the corresponding date field for that status, write the current date. I am thinking I'll need to add the following new fields:

- fldDateNew
- fldDateInfGather
- fldDateComplete
- fldDateExceptions
- fldDateHold
- fldDatePackaging
- fldDatePackComplete
- fldDateAppObjTesting
- fldDateUATTesting
- fldDateRetired
- fldDateTesting
- fldDateTestingComplete
- fldHistory

So when an app gets entered as info gathering, the corresponding date field gets written to. When the app status changes from Info Gathering to New, write the data field.

Additionally, I'd like all the changes to be captured to a history field, that can be displayed via the status page.


A lot of "I'd like to's" here, so if someone is up for the challenge, I'd really appreciate the help.... I've learned quite a bit from everyone so far, so thanks in advance!!


-Chris

(in reply to and13345)
and13345

 

Posts: 99
Joined: 10/7/2003
Status: offline

 
RE: Appending text to a memo field. - 9/14/2004 20:19:27   
What you are asking for seems logical. You will need to have logic in your UPDATE ASP page to check the status field to see if it has changed and if so to what, and when you know what you can update the date field for that status. The way I check for a change in a field like status is to create a hidden field on the form that uses an initial value of what you used for the status you display to the user and I usually call it something like pre_status for previous status. Then when you pass the form information to your UPDATE ASP page you can check the value of pre_status [request.form("pre_status")] to status [request.form("status")] and if different then check to see what the status field is set to (in your example the status was changed to NEW) and update the appropriate field with the time stamp. I have edit forms that use hidden fields for all fields on the form, so each field that the user sees on the form has a hidden field that tracks the previous value for that field in the db. Do a comparison of the fields and if the current value is different than the previous value, you can add to the history DB MEMO field something like "Status was changed from Information Gathering to New", and append a time stamp to that so you know when the change was made.

(in reply to cdrees)
cdrees

 

Posts: 42
Joined: 8/4/2004
Status: offline

 
RE: Appending text to a memo field. - 9/15/2004 9:40:56   
That sounds exactly like what I'd like to do....

Could you post an example form, to show how you've done that?

I'll post the code from my form_edit page and update.asp page, if that would help. Thanks!!


Edit Page:
<!--#include File='login.asa'-->
<%
    If Session(SiteID) <> true Then
        Response.Redirect("Login.asp?requester=edit.asp")
    End If
%>


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Update Form</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Microsoft Theme" content="ice2 1011, default">
</head>

<body>

<div align="center">
	<blockquote>
		<table border="0" width="70%">
			<blockquote>
				<tr>
					<td width="510">
					<p align="left"><font face="Arial"><font size="5"><b>CB</b></font><b><font size="4"><br>
					</font></b></font><b><font face="Arial" size="4">Database Editor</font></b></td>
					<td width="193"><font face="Arial" size="4">
					<a href="http://www.oursite.com">
					<img border="0" src="../../../small_logo.jpg" width="150" height="88" align="right"></a></font></td>
				</tr>
				<tr>
			<td width="703" colspan="2">
      <p align="left">
		<!--webbot bot="Navigation" S-Orientation="horizontal" S-Rendering="graphics" S-Theme="watermar 0100" S-Type="top" B-Include-Home="FALSE" B-Include-Up="FALSE" --></td>
			</tr>
		</table>
	</blockquote>
</div>

<!--#include file="../../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM tblRequest WHERE fldID = ::fldID::"
fp_sDefault="fldID=0"
fp_sNoRecords="No records returned."
fp_sDataConn="Repackage"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&fldID=3&fldRequestor=202&fldAppName=202&fldVendor=202&fldVendorContact=203&fldPriority=202&fldRequestorContact=202&fldAppType=202&fldDate=135&fldAppLocation=203&fldBUContact=202&fldBULine=202&fldAppVersion=202&fldFileCust=203&fldFileRights=203&fldRegistryCust=203&fldRegistryRights=203&fldInstallProcs=203&fldAuthType=202&fldUName=202&fldPWord=202&fldODBCConfig=203&fldNotes=203&fldDepends=203&fldLicense=203&fldMods=203&fldStatus=202&fldAssignedTo=202&fldDateAcknowledged=135&"
fp_iDisplayCols=29
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../../_fpclass/fpdbrgn1.inc"-->
<form METHOD="POST" action="update.asp">
	<div align="center">
	<table BORDER=0 width="70%">

<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Requestor:</font></b></td>
<td width="76%"> <input name="fldRequestor" size="40" value="<%=FP_FieldHTML(fp_rs,"fldRequestor")%>" maxlength="50"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Application Name:</font></b></td>
<td width="76%"> <input name="fldAppName" size="40" value="<%=FP_FieldHTML(fp_rs,"fldAppName")%>" maxlength="50"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Vendor:</font></b></td>
<td width="76%"> <input name="fldVendor" size="40" value="<%=FP_FieldHTML(fp_rs,"fldVendor")%>" maxlength="50"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Vendor Contact:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldVendorContact" cols="30"><%=FP_FieldHTML(fp_rs,"fldVendorContact")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Priority:</font></b></td>
<td width="76%"> <input type="TEXT" name="fldPriority" size="10" value="<%=FP_FieldHTML(fp_rs,"fldPriority")%>" maxlength="10"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Requestor Contact:</font></b></td>
<td width="76%"> <input name="fldRequestorContact" size="40" value="<%=FP_FieldHTML(fp_rs,"fldRequestorContact")%>" maxlength="100"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Application Type:</font></b></td>
<td width="76%"> <select size="1" name="fldAppType">
						<option selected><%=FP_FieldHTML(fp_rs,"fldAppType")%>
						</option>
						<option>Standalone</option>
						<option>Shortcut Only</option>
						<option>Client / Server</option>
						<option>Web App</option>
						<option>Database</option>
						</select></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Date:</font></b></td>
<td width="76%"> <input type="TEXT" name="fldDate" size="16" value="<%=FP_FieldHTML(fp_rs,"fldDate")%>"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Application Location:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldAppLocation" cols="30"><%=FP_FieldHTML(fp_rs,"fldAppLocation")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">BU Contact:</font></b></td>
<td width="76%"> <input name="fldBUContact" size="40" value="<%=FP_FieldHTML(fp_rs,"fldBUContact")%>" maxlength="100"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">BU Line:</font></b></td>
<td width="76%"> <input name="fldBULine" size="40" value="<%=FP_FieldHTML(fp_rs,"fldBULine")%>" maxlength="100"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Application Version:</font></b></td>
<td width="76%"> <input type="TEXT" name="fldAppVersion" size="15" value="<%=FP_FieldHTML(fp_rs,"fldAppVersion")%>" maxlength="15"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">File Customizations:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldFileCust" cols="30"><%=FP_FieldHTML(fp_rs,"fldFileCust")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">File Rights:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldFileRights" cols="30"><%=FP_FieldHTML(fp_rs,"fldFileRights")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Registry Customizations:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldRegistryCust" cols="30"><%=FP_FieldHTML(fp_rs,"fldRegistryCust")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Registry Rights:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldRegistryRights" cols="30"><%=FP_FieldHTML(fp_rs,"fldRegistryRights")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Install Procedures:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldInstallProcs" cols="30"><%=FP_FieldHTML(fp_rs,"fldInstallProcs")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Authentication Type:</font></b></td>
<td width="76%"> <input name="fldAuthType" size="40" value="<%=FP_FieldHTML(fp_rs,"fldAuthType")%>" maxlength="50"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Username:</font></b></td>
<td width="76%"> <input name="fldUName" size="40" value="<%=FP_FieldHTML(fp_rs,"fldUName")%>" maxlength="100"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Password:</font></b></td>
<td width="76%"> <input name="fldPWord" size="40" value="<%=FP_FieldHTML(fp_rs,"fldPWord")%>" maxlength="50"></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">ODBC Configuration:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldODBCConfig" cols="30"><%=FP_FieldHTML(fp_rs,"fldODBCConfig")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Notes:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldNotes" cols="30"><%=FP_FieldHTML(fp_rs,"fldNotes")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Depends:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldDepends" cols="30"><%=FP_FieldHTML(fp_rs,"fldDepends")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">License:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldLicense" cols="30"><%=FP_FieldHTML(fp_rs,"fldLicense")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Modifications:</font></b></td>
<td width="76%"> <textarea rows="4" name="fldMods" cols="30"><%=FP_FieldHTML(fp_rs,"fldMods")%></textarea></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Status:</font></b></td>
<td width="76%"> <select size="1" name="fldStatus">
							<option selected><%=FP_FieldHTML(fp_rs,"fldStatus")%>
							</option>
							<option>New</option>
							<option>Information Gathering</option>
							<option>Complete</option>
							<option>Exceptions</option>
							<option>Hold</option>
							<option>Packaging</option>
							<option>Packaging Complete</option>
							<option>Application Object Testing</option>
							<option>UAT Testing</option>
							<option>Retired</option>
							<option>Testing</option>
							<option>Testing Complete</option>
							</select></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Assigned To:</font></b></td>
<td width="76%"> <select size="1" name="fldAssignedTo">
						<option selected><%=FP_FieldHTML(fp_rs,"fldAssignedTo")%>
						</option>
						<option>Unassigned</option>
						<option>John Kurkis</option>
						<option>Christopher Rees</option>
						<option>John Grant</option>
						<option>Manish Patel</option>
						<option>Geoff Goehler</option>
						</select></td>
</tr>
<tr>
<td bordercolor="#000000" align="right" width="22%" bgcolor="#000097"><b>
<font size="2" face="Arial" color="#FFFFFF">Date Acknowledged:</font></b></td>
<td width="76%"> <select size="1" name="fldDateAcknowledged">
<option selected><%=FP_FieldHTML(fp_rs,"fldDateAcknowledged")%></option>
<option><%=Date%></option>
</select> <font color="#000097" face="Arial" size="2">* Use drop-down box to 
select today's date if the date is incorrect</font></td>
</tr>

	
	<tr>
	<td colspan="2" bordercolor="#000000" align="right" bgcolor="#FFFFFF">
	<p align="center"><font color="#FFFFFF" face="Arial">
	<input type="submit" value="Submit"><input type="reset" value=" Reset "></font></td>
	</tr>

	</table>

	</div>

	<input type="hidden" name="fldID" value="<%=FP_FieldHTML(fp_rs,"fldID")%>">
</form>

<!--#include file="../../../_fpclass/fpdbrgn2.inc"-->


<p align="center"><font size="1"><a href="mailto:christopher.rees@yesbank.com">
e-mail</a> the webmaster</font></p>


</body>

</html>





and the update page (which has the time-stamp for the notes field added that's not working quite right):

<!--#include File='login.asa'-->
<%
    If Session(SiteID) <> true Then
        Response.Redirect("Login.asp?requester=update.asp")
    End If
%>


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>tblRequest -- Updated Record</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="refresh" content="3;url=http://osgwisepkg/Repackage_interface/tblRequest/editor/status.asp"> 

<meta name="Microsoft Theme" content="ice2 1011, default">
</head>

<body>
<div align="center">
	<table border="0" width="70%">
		<tr>
			<td width="510">
			<p align="left"><font face="Arial"><font size="5"><b>Commerce Bank</b></font><b><font size="4"><br>
			</font></b></font><b><font face="Arial" size="4">Database Update</font></b></td>
			<td width="193"><font face="Arial" size="4">
			<img border="0" src="../../../small_logo.jpg" width="150" height="88" align="right"></font></td>
		</tr>
	</table>
	<p><br>
	</p>
	<table border="0" width="70%">
		<tr>
			<td>


<!-- missing code -->

<!--#include file="../../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="UPDATE tblRequest SET fldRequestor = '::fldRequestor::' , fldAppName = '::fldAppName::' , fldVendor = '::fldVendor::' , fldVendorContact = '::fldVendorContact::' , fldPriority = '::fldPriority::' , fldRequestorContact = '::fldRequestorContact::' , fldAppType = '::fldAppType::' , fldDate = '::fldDate::' , fldAppLocation = '::fldAppLocation::' , fldBUContact = '::fldBUContact::' , fldBULine = '::fldBULine::' , fldAppVersion = '::fldAppVersion::' , fldFileCust = '::fldFileCust::' , fldFileRights = '::fldFileRights::' , fldRegistryCust = '::fldRegistryCust::' , fldRegistryRights = '::fldRegistryRights::' , fldInstallProcs = '::fldInstallProcs::' , fldAuthType = '::fldAuthType::' , fldUName = '::fldUName::' , fldPWord = '::fldPWord::' , fldODBCConfig = '::fldODBCConfig::' , fldNotes = '" & Request.Form("fldNotes") & CHR(013) & Now() & CHR(013) & Request.Form("fldNotes") & "', fldDepends = '::fldDepends::' , fldLicense = '::fldLicense::' , fldMods = '::fldMods::' , fldStatus = '::fldStatus::' , fldAssignedTo = '::fldAssignedTo::' , fldDateAcknowledged = '::fldDateAcknowledged::'   WHERE (fldID = ::fldID::)"
fp_sDefault="fldRequestor=none&fldAppName=none&fldVendor=none&fldVendorContact=none&fldPriority=none&fldRequestorContact=none&fldAppType=none&fldDate=&fldAppLocation=none&fldBUContact=none&fldBULine=none&fldAppVersion=none&fldFileCust=none&fldFileRights=none&fldRegistryCust=none&fldRegistryRights=none&fldInstallProcs=none&fldAuthType=none&fldUName=none&fldPWord=none&fldODBCConfig=none&fldNotes=none&fldDepends=none&fldLicense=none&fldMods=none&fldStatus=&fldAssignedTo=&fldDateAcknowledged=&fldID="
fp_sNoRecords="Your record has been updated in Application Repackaging database."
fp_sDataConn="Repackage"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../../_fpclass/fpdbrgn1.inc"-->
<!--#include file="../../../_fpclass/fpdbrgn2.inc"-->


<p><font size="2" face="Arial">You will be returned to the Application Listing 
page in 3 seconds...</font></p>

			<p> </td>
		</tr>
	</table>
</div>

</body>

</html>





Thanks again!

(in reply to and13345)
and13345

 

Posts: 99
Joined: 10/7/2003
Status: offline

 
RE: Appending text to a memo field. - 9/15/2004 20:48:37   
You are using the Request.Form("fldNotes") twice. Once at the beginning, then you add the
time stamp and then you add the same Notes field value again.

You should determine if you want to be able to edit the previous notes or not. I have
attached my EDIT and UPDATE pages that show you how I did it. I want to be able to edit
the previous notes so I have a field for the previous value and a place to add my new
notes. My edit page then evaluates if you added new notes or not and creates the new
value for the fldNotes for the SQL to update.

In my case I have two database fields I do this with, Memo and Comments.
Look for the following fields
record_memo_update
record_memo
comments_update
comments

The code to combine the two fields in to one is at the top of the UPDATE page.

My EDIT Page
<!--#include file="../../../fpdb/connect_db.asp"-->
<!--#include file="../../../fpdb/get_user_info.asp"-->

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Issue Edit</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<!--Calendar Scripts -->
<script language="javascript" src="../../../scripts/cal2.js"></script>
<script language="javascript" src="../../../scripts/cal_conf2.js"></script>
<!--End Calendar Scripts-->
<%
'<!--Start CQ Validation Script -->
'<script language="javascript" src="../../../scripts/cq_validate.js"></script>
'<!--End CQ Validation Script-->
%>
</head>

<body bgcolor="#FFFFFF">
<!--webbot bot="PurpleText" PREVIEW="-Important-  If you modify this Database Results region using the Database Results Wizard, then your Database Editor will no longer work.  If you accidentally open the Database Results Wizard, simply click Cancel to exit without regenerating the Database Results region." -->

<!--webbot bot="DatabaseRegionStart" s-columnnames="id,submitter,version,state,oem_sev,eng_pri,oem_division,cq_number,brief_description,inception_date,current_status,bus_approval_date,eng_approval_date,cust_need_version_date,committed_delievey_version_date,comments,owner,issue_history" s-columntypes="3,202,202,202,5,5,202,202,203,202,202,202,202,202,202,203,202,203" s-dataconnection="oem_priorities" b-tableformat="FALSE" b-menuformat="FALSE" s-menuchoice="id" s-menuvalue="id" b-tableborder="TRUE" b-tableexpand="TRUE" b-tableheader="TRUE" b-listlabels="TRUE" b-listseparator="FALSE" i-ListFormat="5" b-makeform="FALSE" s-RecordSource="oem_priorities" s-displaycolumns="id,version,state,oem_sev,eng_pri,oem_division,cq_number,brief_description,inception_date,current_status,bus_approval_date,eng_approval_date,cust_need_version_date,committed_delievey_version_date,comments,owner,submitter" s-criteria="{id} EQ {id} +" s-order s-sql="SELECT * FROM oem_priorities WHERE (id =  ::id::)" b-procedure="FALSE" clientside SuggestedExt="asp" s-DefaultFields="id=0" s-NoRecordsFound="No records returned." i-MaxRecords="1" i-GroupSize="0" u-dblib="../../../_fpclass/fpdblib.inc" u-dbrgn1="../../../_fpclass/fpdbrgn1.inc" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" Tag="BODY" BOTID="0" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the start of a Database Results region.</font></td></tr></table>" startspan b-WasTableFormat="FALSE" b-ReplaceDatabaseRegion="FALSE" --><!--#include file="../../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM oem_priorities WHERE (id =  ::id::)"
fp_sDefault="id=0"
fp_sNoRecords="No records returned."
fp_sDataConn="oem_priorities"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice="id"
fp_sMenuValue="id"
fp_sColTypes="&id=3&submitter=202&version=202&state=202&oem_sev=5&eng_pri=5&oem_division=202&cq_number=202&brief_description=203&inception_date=202¤t_status=202&bus_approval_date=202&eng_approval_date=202&cust_need_version_date=202&committed_delievey_version_date=202&comments=203&owner=202&issue_history=203&"
fp_iDisplayCols=17
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" endspan i-CheckSum="20698" --> <!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.version.selectedIndex == 0)
  {
    alert("The first \"Version\" option is not a valid selection.  Please choose one of the other options.");
    theForm.version.focus();
    return (false);
  }

  if (theForm.state.selectedIndex == 0)
  {
    alert("The first \"State\" option is not a valid selection.  Please choose one of the other options.");
    theForm.state.focus();
    return (false);
  }

  if (theForm.oem_sev.selectedIndex == 0)
  {
    alert("The first \"OEM Severity\" option is not a valid selection.  Please choose one of the other options.");
    theForm.oem_sev.focus();
    return (false);
  }

  if (theForm.eng_pri.selectedIndex == 0)
  {
    alert("The first \"Engineering Priority\" option is not a valid selection.  Please choose one of the other options.");
    theForm.eng_pri.focus();
    return (false);
  }

  if (theForm.oem_division.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"oem_division\" field.");
    theForm.oem_division.focus();
    return (false);
  }

  if (theForm.cust_need_version_date.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"cust_need_version_date\" field.");
    theForm.cust_need_version_date.focus();
    return (false);
  }

  if (theForm.committed_delievey_version_date.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"committed_delievey_version_date\" field.");
    theForm.committed_delievey_version_date.focus();
    return (false);
  }

  if (theForm.rev_proj.value.length > 255)
  {
    alert("Please enter at most 255 characters in the \"rev_proj\" field.");
    theForm.rev_proj.focus();
    return (false);
  }

  var checkOK = "0123456789-.,";
  var checkStr = theForm.rev_proj.value;
  var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch == ".")
    {
      allNum += ".";
      decPoints++;
    }
    else if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
  {
    alert("Please enter only digit characters in the \"rev_proj\" field.");
    theForm.rev_proj.focus();
    return (false);
  }

  if (decPoints > 1)
  {
    alert("Please enter a valid number in the \"rev_proj\" field.");
    theForm.rev_proj.focus();
    return (false);
  }

  if (theForm.owner.selectedIndex == 0)
  {
    alert("The first \"Owner\" option is not a valid selection.  Please choose one of the other options.");
    theForm.owner.focus();
    return (false);
  }
  return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form METHOD="POST" action="update.asp" name="FrontPage_Form1" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript">
	<table BORDER=0>

<tr>
<td valign="top">
<p align="right"><b><font face="Verdana" size="2">ID #:</font></b></td>
<td valign="top">
<font face="Verdana" size="2">
<!--webbot bot="DatabaseResultColumn" s-columnnames="id,submitter,version,state,oem_sev,eng_pri,oem_division,cq_number,brief_description,inception_date,current_status,bus_approval_date,eng_approval_date,cust_need_version_date,committed_delievey_version_date,comments,owner,issue_history" s-column="id" b-tableformat="FALSE" b-hasHTML="FALSE" clientside startspan b-makelink="FALSE" b-MenuFormat preview="<font size="-1">&lt;&lt;</font>id<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"id")%><!--webbot bot="DatabaseResultColumn" endspan i-CheckSum="3421" --></font></td>
</tr>

<tr>
    <td valign="top" width="152" align="right" height="22"><b>
    <font face="Verdana" size="2">Submitter:</font></b></td>
    <td valign="top" width="605" height="22"><font face="Verdana"> </font><font face="Verdana" size="2"><!--webbot bot="DatabaseResultColumn" s-columnnames="id,submitter,version,state,oem_sev,eng_pri,oem_division,cq_number,brief_description,inception_date,current_status,bus_approval_date,eng_approval_date,cust_need_version_date,committed_delievey_version_date,comments,owner,issue_history" s-column="submitter" b-tableformat="FALSE" b-hasHTML="FALSE" clientside startspan b-makelink="FALSE" b-MenuFormat preview="<font size="-1">&lt;&lt;</font>submitter<font size="-1">&gt;&gt;</font>" --><%=FP_FieldVal(fp_rs,"submitter")%><!--webbot bot="DatabaseResultColumn" endspan i-CheckSum="24240" --></font></td>
</tr>

<tr>
    <td valign="top" width="152" align="right" height="22"><font size="2" face="Verdana"><b>
    Version:</b></font></td>
    <td valign="top" width="605" height="22"><font face="Verdana">
     <!--webbot bot="Validation" s-display-name="Version" b-disallow-first-item="TRUE" --><select size="1" name="version"><option>Please Select</option>
    <!--#include file="../../../fpdb/dd_edit_version.asp"-->
    </select></td>
</tr>
<tr>
    <td valign="top" width="152" align="right" height="22"><font size="2" face="Verdana"><b>
    State:</b></font></td>
    <td valign="top" width="605" height="22"><font face="Verdana">
   	 <!--webbot bot="Validation" s-display-name="State" b-disallow-first-item="TRUE" --><select size="1" name="state"><option>Please Select</option>
	<!--#include file="../../../fpdb/dd_edit_state.asp"-->
	</select></td>
</tr>
<tr>
    <td valign="top" width="152" align="right" height="22"><font size="2" face="Verdana"><b>
    OEM Severity:</b></font></td>
    <td valign="top" width="605" height="22"><font face="Verdana">
     <!--webbot bot="Validation" s-display-name="OEM Severity" b-disallow-first-item="TRUE" --><select size="1" name="oem_sev"><option>Please Select</option>
	<!--#include file="../../../fpdb/dd_edit_oem_sev.asp"-->
	</select></td>
</tr>
<tr>
	<td valign="top" width="152" align="right"><b><font face="Verdana" size="2">
	Engineering Priority:</font></b></font></td>
    <td valign="top" width="605"><font face="Verdana">
     <!--webbot bot="Validation" s-display-name="Engineering Priority" b-disallow-first-item="TRUE" --><select size="1" name="eng_pri"><option>Please Select</option>
	<!--#include file="../../../fpdb/dd_edit_eng_pri.asp"-->
	</font>
	</select></td>
</tr>
<tr>
<td valign="top" align="right"><b><font size="2" face="Verdana">OEM/Division:</font></b></td>
<td valign="top"><font size="2" face="Verdana"> </font><font size="1" face="Verdana"><!--webbot bot="Validation" s-display-name="oem_division" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="oem_division" size="64" value="<%=FP_FieldHTML(fp_rs,"oem_division")%>" maxlength="255"></font></td>
</tr>
<tr>
<td valign="top" align="right"><b><font size="2" face="Verdana">Brief Description:</font></b></td>
<td valign="top"><font size="2" face="Verdana"> </font><font size="1" face="Verdana"><!--webbot bot="Validation" s-display-name="brief_description" s-data-type="String" b-value-required="False" i-maximum-length="0" --><textarea rows="10" name="brief_description" cols="64"><%=FP_FieldHTML(fp_rs,"brief_description")%></textarea></font></td>
</tr>
<tr>
<td valign="top" align="right"><b><font face="Verdana" size="2">Start Date:</font></b></td>
<td valign="top"><font size="2" face="Verdana"> </font><font size="1" face="Verdana"><input name="inception_date" size="20" value="<%=FP_FieldHTML(fp_rs,"inception_date")%>" onClick="showCal('inc_date_cal')"><a href="javascript:showCal('inc_date_cal')"><img src="../../../images/cal.gif" border="0" alt="Click here and select your date"></a></font></td>
</tr>
<tr>
<td valign="top" align="right" height="50"><b><font size="2" face="Verdana">Customer Need<br>
Version/Date:</font></b></td>
<td valign="top" height="50"><font size="2" face="Verdana"> </font><font size="1" face="Verdana"><!--webbot bot="Validation" s-display-name="cust_need_version_date" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="cust_need_version_date" size="64" value="<%=FP_FieldHTML(fp_rs,"cust_need_version_date")%>" maxlength="255"></font></td>
</tr>
<tr>
<td valign="top" align="right" height="50"><b><font size="2" face="Verdana">Committed Delivery<br>
Version/Date:</font></b></td>
<td valign="top" height="50"><font size="2" face="Verdana"> </font><font size="1" face="Verdana"><!--webbot bot="Validation" s-display-name="committed_delievey_version_date" s-data-type="String" b-value-required="False" i-maximum-length="255" --><input type="TEXT" name="committed_delievey_version_date" size="64" value="<%=FP_FieldHTML(fp_rs,"committed_delievey_version_date")%>" maxlength="255"></font></td>
</tr>
<tr>
<td valign="top" align="right"><b><font face="Verdana" size="2">Memo Update:<br>
</font></b><font face="Verdana" size="1">Enter new memos here</font></td>
<td valign="top"><font size="1" face="Verdana"> <!--webbot bot="Validation" s-display-name="comments" s-data-type="String" b-value-required="False" i-maximum-length="0" --><textarea rows="5" name="record_memo_update" cols="64"></textarea></font></td>
</tr>
<tr>
<td valign="top" align="right"><b><font face="Verdana" size="2">Current Memo:<br>
</font></b><font face="Verdana" size="1">This field is used to modify<br>
Previously entered memos</font><font face="Verdana" size="2"><b><br>
</b></font></td>
<td valign="top"><font size="2" face="Verdana"> </font><font size="1" face="Verdana"><!--webbot bot="Validation" s-display-name="comments" s-data-type="String" b-value-required="False" i-maximum-length="0" --><textarea rows="8" name="record_memo" cols="64"><%=FP_FieldHTML(fp_rs,"record_memo")%></textarea></font></td>
</tr>
<tr>
<td valign="top" align="right"><b><font face="Verdana" size="2">Comments Update:<br>
</font></b><font face="Verdana" size="1">Enter new comments here</font></td>
<td valign="top"><font size="1" face="Verdana"> <!--webbot bot="Validation" s-display-name="comments" s-data-type="String" b-value-required="False" i-maximum-length="0" --><textarea rows="5" name="comments_update" cols="64"></textarea></font></td>
</tr>
<tr>
<td valign="top" align="right"><b><font size="2" face="Verdana">Current Comments:<br>
</font></b><font face="Verdana" size="1">This field is used to <br>
modify previously <br>
entered comments</font></td>
<td valign="top"><font size="2" face="Verdana"> </font><font size="1" face="Verdana"><!--webbot bot="Validation" s-display-name="comments" s-data-type="String" b-value-required="False" i-maximum-length="0" --><textarea rows="8" name="comments" cols="64"><%=FP_FieldHTML(fp_rs,"comments")%></textarea></font></td>
</tr>
<tr>
    <td valign="top" width="152" align="right" height="22"><b><font face="Verdana" size="2">Projected
    <br>
    Annual 
Rev:</font></b></td>
    <td valign="top" width="605" height="22"><font face="Verdana">
     <!--webbot bot="Validation" S-Display-Name="rev_proj" S-Data-Type="Number" S-Number-Separators=",." I-Maximum-Length="255" --><input name="rev_proj" size="20" value="<%=FP_FieldHTML(fp_rs,"rev_proj")%>" maxlength="255"></td>
</tr>

	
<tr>
    <td valign="top" width="152" align="right" height="22"><b><font face="Verdana" size="2">
    Owner:</font></b></font></td>
    <td valign="top" width="605" height="22"><font face="Verdana">
     <!--webbot bot="Validation" s-display-name="Owner" b-disallow-first-item="TRUE" --><select size="1" name="owner"><option>Please Select</option>
	<!--#include file="../../../fpdb/dd_edit_owner.asp"-->
	</font>
	</select></td>
</tr>

	
	<tr>
	<td colspan="2" valign="top"><font size="1" face="Verdana"><input type="submit" value="    OK    "> <input type="reset" value=" Reset "> </font>
    <INPUT TYPE="button" VALUE="Cancel" onClick="history.go(-1)"></td>
	</tr>

	</table>

	<input type="hidden" name="id" value="<%=FP_FieldHTML(fp_rs,"id")%>">
    <input type="hidden" name="issue_history" value="Issue MODIFIED on <%=left(Date(),10)%> at <%=left(Time(),12)%> by <%=(login_full_name) & vbcrlf %> <%=FP_FieldHTML(fp_rs,"issue_history")%>">
    <input type="hidden" name="previous_owner" value="<%=FP_FieldHTML(fp_rs,"owner")%>">
    <input type="hidden" name="submitter" value="<%=FP_FieldHTML(fp_rs,"submitter")%>">
    <input type="hidden" name="previous_state" value="<%=FP_FieldHTML(fp_rs,"state")%>">
    <input type="hidden" name="page_type" value="edit">
</form>

<!--webbot bot="DatabaseRegionEnd" b-tableformat="FALSE" b-menuformat="FALSE" u-dbrgn2="../../../_fpclass/fpdbrgn2.inc" i-groupsize="0" clientside Tag="BODY" preview="<table border=0 width="100%"><tr><td bgcolor="#FFFF00" align="left"><font color="#000000">This is the end of a Database Results region.</font></td></tr></table>" startspan --><!--#include file="../../../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" endspan i-CheckSum="9297" -->

</body>

</html>



My UPDATE Page
<!--#include file="../../../site_title.asp"-->
<%
IF request("record_memo_update") <> "" THEN
	record_memo_str = Date() & ": " & request("record_memo_update") & vbcrlf & request("record_memo")
ELSE
	record_memo_str = request("record_memo")
END IF

IF request("comments_update") <> "" THEN
	comments_str = Date() & ": " & request("comments_update") & vbcrlf & request("comments")
ELSE
	comments_str = request("comments")
END IF


Function CleanInput(input) 
CleanInput = Replace(input,"'","''") 
End Function


%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Issue Update</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>

<body bgcolor="#FFFFFF">
<!--webbot bot="PurpleText" PREVIEW="-Important-  If you modify this Database Results region using the Database Results Wizard, then your Database Editor will no longer work.  If you accidentally open the Database Results Wizard, simply click Cancel to exit without regenerating the Database Results region." -->

<%
IF request("page_type") <> "memo_edit" THEN
%>
<script Language="JavaScript">
<!--
	top.list.location.href = top.list.location.href;
// -->
</script>
<%
END IF
%>




<!--#include file="../../../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
</SCRIPT>
<% end if %>
<%
IF request("page_type") = "edit" THEN
	fp_sQry="UPDATE oem_priorities SET version = '::version::' , state = '::state::' , oem_sev = '::oem_sev::' , eng_pri = '::eng_pri::' , oem_division = '::oem_division::' , cq_number = '::cq_number::' , brief_description = '::brief_description::' , inception_date = '::inception_date::' , current_status = '::current_status::' , bus_approval_date = '::bus_approval_date::' , eng_approval_date = '::eng_approval_date::' , cust_need_version_date = '::cust_need_version_date::' , committed_delievey_version_date = '::committed_delievey_version_date::' , record_memo = '"&CleanInput(record_memo_str)&"' , comments = '"&CleanInput(comments_str)&"' , rev_proj = '::rev_proj::', owner = '::owner::', issue_history = '::issue_history::'  WHERE (id = ::id::)"
END IF
IF request("page_type") = "memo_edit" THEN
	fp_sQry="UPDATE oem_priorities SET record_memo = '"&CleanInput(record_memo_str)&"' , issue_history = '::issue_history::'  WHERE (id = ::id::)"
END IF
fp_sDefault="version=&state=&oem_sev=&eng_pri=&oem_division=&cq_number=&brief_description=&inception_date=¤t_status=&bus_approval_date=&eng_approval_date=&cust_need_version_date=&committed_delievey_version_date=&record_memo=&comments=&owner=&issue_history=&id="
fp_sNoRecords=""
fp_sDataConn="oem_priorities"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&id=3&submitter=202&version=202&state=202&oem_sev=5&eng_pri=5&oem_division=202&cq_number=202&brief_description=203&inception_date=202¤t_status=202&bus_approval_date=202&eng_approval_date=202&cust_need_version_date=202&committed_delievey_version_date=202&record_memo=203&comments=203&rev_proj=3&owner=202&issue_history=203&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../../../_fpclass/fpdbrgn1.inc"-->

<p><!--webbot bot="PurpleText" PREVIEW="This is the UPDATE query." --></p>
<!--#include file="../../../_fpclass/fpdbrgn2.inc"-->

<!--#include file="../../../fpdb/cq_server_address.asp"-->
<!--#include file="../../../fpdb/set_form_var.asp"-->
<!--#include file="../../../fpdb/determine_cq_link.asp"-->

<!--#include file="../sendmail_update.asp"-->

<p>
<%
IF request("page_type") = "edit" THEN
%>	  
<!--#include file="../../../heading.asp"--></p>
<p><b><font face="Verdana">Your Issue has been 
  successfully Updated:</font></b></p>
<p><b><font face="Verdana" size="2"><a target="_top" href="database_editor.asp">
Database Editor</a>    
<a target="_top" href="search_frame.asp">Lookup Issue ID</a></font></b></p>
<%
END IF


IF request("page_type") = "memo_edit" THEN
%>
<div align="center">
  <center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">
  <tr>
    <td width="100%" align="center">
    <BR><BR><BR><BR><BR><BR><BR><BR>
    <p align="center"><font face="Verdana" size="6" color="#000080"><%response.write site_title%> MEMO Editor</font></td>
  </tr>
  <tr>
    <td width="100%" align="center"><b><font face="Verdana">You have successfully updated the MEMO for OEM Action Item #<%response.write request.form("id")%>:</font></b></td>
  </tr>
  <tr>
    <td width="100%" align="center"><br>
     <input type=button value="Close" onClick="javascript:window.close();"></td>
  </tr>
</table>
  </center>
</div>
<%
END IF
%>






</body>

</html>

(in reply to cdrees)
cdrees

 

Posts: 42
Joined: 8/4/2004
Status: offline

 
RE: Appending text to a memo field. - 9/21/2004 11:01:38   
that worked like a charm... thanks very much!!

I really appreciate the help on that one.. It's given me quite a bit to work with adding some other functionality as well.

-Chris

(in reply to and13345)
and13345

 

Posts: 99
Joined: 10/7/2003
Status: offline

 
RE: Appending text to a memo field. - 9/21/2004 11:11:46   
Glad to have been some assistance. I have used this forum for a year or so getting help with my problems. It's nice to finally help someone else out for a change.

(in reply to cdrees)
debbie31210

 

Posts: 25
Joined: 12/2/2005
Status: offline

 
RE: Appending text to a memo field. - 1/23/2006 14:18:09   
I'm trying to do this but I'm getting a syntax error in update statement. What's my problem? I even created fields in my database to match the field in the code example... here's my code

fp_sQry="UPDATE Table1 SET (myMemoField = '" & Request.Form("myMemoField") & CHR(013) & Now() & CHR(013) & Request.Form("myFormField") & "') WHERE LoanNumber = " & Request.Form("LoanNumber")

(in reply to and13345)
rdouglass

 

Posts: 9270
From: Biddeford, ME USA
Status: offline

 
RE: Appending text to a memo field. - 1/23/2006 14:58:08   
quote:

I'm getting a syntax error in update statement.


What is the specific error?

Also, try SETting your fields without parens like so:

fp_sQry="UPDATE Table1 SET myMemoField = '" & Request.Form("myMemoField") & CHR(013) & Now() & CHR(013) & Request.Form("myFormField") & "' WHERE LoanNumber = " & Request.Form("LoanNumber")

Lastly I'm assuming LoanNumber is numeric?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to debbie31210)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Appending text to a memo field.
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts