Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
|
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2004, 04:03 PM
Authorized User
 
Join Date: Jul 2003
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access update memo field problem

I have an edit form like this (more fields on actual form)

<tr>
<td>Description</td>
<td height="20"><%=oRS("describe")%></td>
</tr>
<tr>
<td><b>New Description</b></td>
<td height="26"><input type=text name=describe></td>
</tr>

The field named “describe” in the mdb is actually a memo field. But if I change the input type to textarea like this

Describe:<br> <TEXTAREA name="describe" rows="5" cols="80">
</TEXTAREA>

and submit the form it deletes/writes over what is already in that field. I have the same problem with a drop down selection I’m using. Once again if I leave the input type as text it works great.

Here is the code that actually writes the update.


<body>
<h1>Edit Response Write</h1>
<%
    Dim oRS
    Dim varName
    varauto_id =Request.QueryString ("auto_id")
    varcode =Request.QueryString ("code")
    vartitle =Request.QueryString ("title")
    varurl =Request.QueryString ("url")
    varfile_name =Request.QueryString ("file_name")
    varbox =Request.QueryString ("box")
    vardescribe =Request.QueryString ("describe")
    varlocation =Request.QueryString ("location")
    varsource =Request.QueryString ("source")
    varcreated =Request.QueryString ("created")
    varsub_category =Request.QueryString ("sub_category")


    'following line for testing
    'Response.Write varauto_ID & "<br>"
    'Response.Write "vartitle = " & vartitle & "<br>"

    Set oRS=Server.CreateObject ("ADODB.Recordset")
    oRS.Open "links", "DSN=cumber",adOpenKeyset,adLockOptimistic
    oRS.Find "auto_ID = " & varauto_ID
    If oRS.EOF Then
        Response.Write "There was an error in finding your item"
        Response.Write "<a href='index.asp'>Homepage</a>"
    End If

    'Perform Updates
    If varcode<>"" Then oRS("code") = varcode
    If vartitle<>"" Then oRS("title") = vartitle
    If varurl<>"" Then oRS("url") = varurl
    If varfile_name<>"" Then oRS("file_name") = varfile_name
    If varbox<>"" Then oRS("box") = varbox
    If vardescribe<>"" Then oRS("describe") = vardescribe
    If varlocation<>"" Then oRS("location") = varlocation
    If varsource<>"" Then oRS("source") = varsource
    If varcreated<>"" Then oRS("created") = varcreated
    If varsub_category<>"" Then oRS("sub_category") = varsub_category
    oRS.Update
%>









Similar Threads
Thread Thread Starter Forum Replies Last Post
Memo Field Brendan Bartley Access 11 December 13th, 2007 04:28 PM
Memo field not displaying meichmann SQL Server ASP 3 August 31st, 2006 11:36 AM
Inserting data into an Access memo field with SQL jhunta VB How-To 3 September 20th, 2005 02:49 PM
Problem with memo field in Access 97 Ardeshir Access 4 December 27th, 2004 06:05 AM
testing for empty Access memo field RDEdwards Classic ASP Databases 3 November 9th, 2004 09:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.