Is this right?

Results 1 to 2 of 2

Thread: Is this right?

  1. #1
    Join Date
    Dec 1969

    Default Is this right?

    I am working on SQL server database. I want to insert nothing if user did not type any thing in the text or select any thing form the list boxes.<BR><BR>Dim item<BR> For Each Item in Request.Form<BR> If item = "" Then<BR> Request.Form(item)= Null<BR> End If<BR><BR> Response.Write " Item:" = & Request.Form(Item) <BR> Next<BR>The out put was very strange. It was not in a order.<BR>Any idea? <BR>THANKS.

  2. #2
    Join Date
    Dec 1969

    Default Not quite...

    item refers to the name of the field being passed. The field is still passed regardless of whether or not there&#039;s any info in it. So your if item="" will never fire because every item in request.form will have a value. Are you trying to insert a Null? Or insert a blank?<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