Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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 November 5th, 2004, 04:52 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default text boxes do not disappear in an asp

When the user hits delete button, the text boxes assigned
do not disapper from the web, but records get deleted from database.
I want text boxes to disappear from the web.

  if Request.Form("txtMode")="R" then
   ' objHistoryRate.Requery
    delFrom = Request.Form("txtdelFrom")
    delTo = Request.Form("txtdelTo")
    delRate = Request.Form("txtdelRate")

   ' strDel = " delete from tblCustRate "&_
            '" where iEmpID = " & iEmpID &_
            '" and iTaskiD = " & iTaskID&_
            '" and iProjDetiD = " & iProjDetID&_
            '" and dtRateFrom ='" & delFrom& "'" &_
            '" and dtRateTo ='" & delTo& "'" &_
            '" and decHourlyRate = " & delRate
    strDel = "delete from tblCustRate"
    if resType ="E" then
      strDel = strDel & " where iEmpID =" & iEmpID
    else
      strDel = strDel & " where iSubcontID =" & iSubcontID
    end if
      strDel = strDel & " and iTaskiD = " & iTaskID&_
            " and iProjDetiD = " & iProjDetID&_
            " and dtRateFrom =' " & delFrom& "'"&_
            " and dtRateTo =' " & delTo& "'"&_
            " and decHourlyRate = " & delRate
    'end if

        'if dateFrom = "" then
         if delFrom ="" then
            strDel = strDel + " and dtRateFrom is null"
        else
            strDel = strDel + " and dtRateFrom='" & delFrom &"'"
        end if
        'if dateUntil = "" then
        if delTo="" then
            strDel = strDel + " and dtRateTo is null"
        else
            strDel = strDel + " and dtRateTo='" & delTo &"'"
        end if




  set rsStrDelete=Server.CreateObject("ADODB.Recordset")
  rsStrDelete.ActiveConnection = objConn
  Response.Write strDel
  objConn.Execute(strDel)
  'rsStrDelete.Open strDel
  'objHistoryRate.Requery
  end if

 
Old November 6th, 2004, 01:51 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I guess I was not able to explain the question in a better way. Let me explain it one more time. When I hit "new" button three text boxes appear horizontally without any contents in it. Know the user enter the contents and hit "save" button and gets saved in the database. Know when the user tries to hit an "image" which is delete button located horizontaly with three txt boxes. It deletes the contents in the database, but in an asp remains unchanged. The user doesnot notice any change in the web. So I want text boxes and contents to get deleted from the web. I hope this makes sense. The code you wrote I assume it will only clear the contents not the txt boxes.
Shoakat







Similar Threads
Thread Thread Starter Forum Replies Last Post
Cycling through all text boxes sjf905 C# 2 September 21st, 2006 12:43 AM
I want text boxes and values to disappear in asP shoakat ASP.NET 1.0 and 1.1 Basics 4 April 26th, 2005 04:55 PM
text boxes do not disappear in an aspI shoakat ASP.NET 1.0 and 1.1 Basics 6 November 10th, 2004 09:20 AM
HELP with text boxes on webpage rwheeleragco Javascript How-To 1 November 2nd, 2004 04:32 AM





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