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 October 26th, 2004, 04:26 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default passing parameters to delete the records in databa

Hello Guys, I am trying to pass parameters which are in array and
the values are not passed. Can you help me please, The values I try to pass are txtdateFrom,txtdateUntil, txtHourlyRate. I try to pass
in the function Confirm delete. Then I try to see whether the values are passed or not. They are not pass. Please help me and modify the code.
 Do while not objHistoryRate.EOF

    dateFrom =cstr(convNull (objHistoryRate("dtRateFrom")))
    dateUntil=cstr(convNull (objHistoryRate("dtRateTo")))
    HourlyRate=cstr(convNull(objHistoryRate("decHourly Rate")))

    strGrid =strGrid+ " <TD><INPUT type=""text"" size=15 id=txtdateFrom name=txtdateFrom value='"+ dateFrom +" '></TD>"
    strGrid =strGrid+ " <TD><INPUT type=""text"" size=15 id=txtdateUntil name=txtdateUntil value='"+ dateUntil+" '></TD>"
    strGrid =strGrid+ " <TD><INPUT type=""text"" size=15 id=txtHourlyRate name=txtHourlyRate value='"+HourlyRate+" '></TD>"
    strGrid =strGrid+ " <TD ><img type =""button"" name=btnDelete src ='images/xDel1.gif' onclick=""javascript:deleteConfirm(txtdateFrom,txt dateUntil,txtHourlyRate);""></TD></TR>"
    'Response.Write("<br>loop" +cstr(index)+"</br>")
        objHistoryRate.MoveNext()

loop
end if
strGrid = strGrid + "</Tr></TABLE>"
Response.Write(strGrid)

<script language = javascript>
 function deleteConfirm(txtdateFrom,txtdateUntil,txtHourlyRa te) {
  var Msg="DO you want to Delete the record";
   if (confirm(Msg)){
   dateFrom1=document.thisForm.txtdateFrom.value;
   dateUntil2=document.thisForm.txtdateUntil.value;
   HourlyRate3=document.thisForm.txtHourlyRate.value;

    document.thisForm.submit();
       return true; }
  else {
       alert("Record not deleted")
          return false;}
if Request.Form("txtMode")="R" then
    strDel = "delete * from tblCustRate" &_
            "where iEmpID =" & iEmpID &_
            "and iTaskiD=" & iTaskID&_
            "and iProjDetiD=" & iProjDetID&_
            " and dtRateFrom=" &dateFrom1&_
            " and dtRateTo=" &dateUntil2&_
            " and decHourlyRate=" &HourlyRate3

  set rsStrDelete =server.CreateObject("ADODB.Recordset")
  rsStrDelete.ActiveConnection = objConn
  Response.Write strDel


 
Old October 27th, 2004, 12:01 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Shoakat,

Sorry, if that sounds rude. When your other thread is being answered, why do you have to start off a new thread on that same subject?

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
passing parameters fizzerchris Access VBA 5 August 31st, 2007 12:16 PM
Passing parameters tal Ajax 5 May 26th, 2007 08:07 AM
Passing parameters ceema Crystal Reports 0 February 15th, 2006 04:03 AM
Passing Parameters spraveens Javascript 5 October 8th, 2003 07:06 AM
passing parameters spraveens Javascript How-To 1 October 8th, 2003 03:14 AM





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