asp ado..urgent

Results 1 to 2 of 2

Thread: asp ado..urgent

  1. #1
    Join Date
    Dec 1969

    Default asp ado..urgent

    Hi pals<BR>I am looking for somebody who can help me finding out a solution for my problem in ASP with recorset.The problem is..<BR>I have three different forms and in the first form my client selects a database, to view the records and there is a radio button with the primary key column (for deleting the records) and in another form my delete button is there which deletes the clicked record.I am usng Javascript to get the value of the radio button but i need to have the max records count in order the script to execute properly, what i am doing is i am setting the value of maxrecords to the upperboundary in the loop,can anybody help me out how to get the maxrecords count so that i can use it in my javascript code..please help me<BR>Tracy

  2. #2
    KRISHNA Guest

    Default RE: asp ado..urgent

    as i understood, u have a radio button (which corresponds to the primary key value in DB) and on next page when delete button is hit you have to remove the record corresponding to the radio button value. Well, you can select the max record in the first page and pass that value through hidden form field (basically text) to next page use that in javascript.<BR>1st page<BR>Assuming you have RS as recordset and CONN as connection object.<BR>strSQL = select max(field1) from db<BR>RS=CONN.EXECUTE(strSQL)<BR><BR>&#060;INPUT TYPE="HIDDEN" NAME="MAXFIELD" VALUE=&#060;%=RS("FIELD1")%&#062;<BR>2nd page<BR>get the value of hidden variable<BR>&#060;INPUT TYPE="HIDDEN" NAME="PassedFIELD" VALUE=&#060;%=Request.form("MAXFIELD")%&#062;<BR>< BR>have a hidden form field here too to capture the value of the passed value here.<BR>NOW IN javascript you can use like this<BR>&#060;javascript&#062;<BR>val=document.for m1.PassedField.value;<BR>&#060;/script&#062;<BR>which refers to the maximum value of the field(primary key field)<BR><BR>Hope this answers your question.Any questions, let me know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts