response.write SELECTed value

Results 1 to 2 of 2

Thread: response.write SELECTed value

  1. #1
    Join Date
    Dec 1969

    Default response.write SELECTed value

    Can someone tell me how to write the returned value of a SELECT to view it...<BR><BR><BR>strAgreeDe = "select AgreeDesc FROM AgreeTbl where agreeCode ="&strAgree<BR>Set objRS = Server.CreateObject("ADODB.Recordset")<BR>Set objRS = objConn.Execute (strAgreeDe)<BR><BR>response.write "select is " &strAgreeDe

  2. #2
    Join Date
    Dec 1969

    Default HUH???

    You *are* writing out the query.<BR><BR>Do you mean you want the *RESULTS* of the query???<BR><BR>Then something like<BR><BR>strAgreeDe = "select AgreeDesc FROM AgreeTbl where agreeCode ="&strAgree<BR>Set objRS = objConn.Execute (strAgreeDe)<BR><BR>If objRS.EOF Then<BR> Response.Write "There were no records with agreeCode of " & strAgree<BR>Else<BR> Do Until objRS.EOF<BR> Response.Write objRS("AgreeDesc") & "&#060;P&#062;"<BR> objRS.MoveNext<BR> Loop<BR>End If<BR>%&#062;<BR><BR>You do not need or want the line<BR> Set objRS = Server.CreateObject("ADODB.Recordset")<BR>All that does is create an object that you then immediately throw away in the next line.<BR><BR>

Posting Permissions

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