Database field update with added text.

  • Thread starter Thread starter Mettá
  • Start date Start date
M

Mettá

When a user updates a memo field via a form I want to add an addition at the
end to say something like
Updated dd/mm/yyyy

I have done this by adding a hidden field to the form which repeats the
field name with the value
Updated <%=Now()%>

However it shows up as
..... text, Updated dd/mm/yyyy

I get the usual FP warning about duplicate field names and it works but I
would like to get rid of the comma.

How can I prevent the comma showing up??

Thanks
M
 
You have to combine the two fields together prior to inserting/updating the single field in the
database. Each field on the form must be uniquely named.

Memo1 = request.form("memofield")
MUpdate = request.form("memoupdate")

Memo = Memo1 + "<br>" + "Updated " + MUpdate

This will require you to hand write the entire ASP/VBScript code to update the record.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WebMaster Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Thanks, I will have a go.

M


Thomas A. Rowe said:
You have to combine the two fields together prior to inserting/updating
the single field in the database. Each field on the form must be uniquely
named.

Memo1 = request.form("memofield")
MUpdate = request.form("memoupdate")

Memo = Memo1 + "<br>" + "Updated " + MUpdate

This will require you to hand write the entire ASP/VBScript code to
update the record.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WebMaster Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
<%Dim text1c
Text1c=request.form("text1")&request.form("text1b")%>


The above outputs Text1 and Text1b as one string on screen with <%=text1c%>
but it does not save to the db??

The sql reads as
bla...text1='::text1c::'...


What am I doing wrong?
 
I also tried

set Text1=('::Text1::'&'::Text1a::')

and
set Text1='::Text1::'&'::Text1a::'

within the sql update

Thanks
M
 
Ok, based on my example:

Memo1 = request.form("memofield")
MUpdate = request.form("memoupdate")
MemoA = Memo1 + "<br>" + "Updated " + MUpdate


SQL Insert Statement:

Memofile = '" & MemoA & "'

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WebMaster Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
Back
Top