ASP Newbie help

Results 1 to 4 of 4

Thread: ASP Newbie help

  1. #1
    Join Date
    Dec 1969

    Default ASP Newbie help

    Could anyone help an ASP newbie out with some of his sloppy code. It would be much appreciated.<BR><BR>I can get the second part of the if statement to work fine but when it comes to the first I am rather lost. It seems like even when I call the first part of the if statement it will still go and process the second part.<BR><BR>""""""""""""""""""""""""""""""""""""" """"""""""<BR><BR>This is what I am passing through:<BR>http://cn23/btfc/admin/doneedit.asp?delete=yes,id=7<BR><BR>"""""""""""""" """""""""""""""""""""""""""""""""<BR><BR>&#060;%<B R><BR>Set Conn = Server.CreateObject("ADODB.Connection")<BR>Conn.Op en "btfc"<BR><BR>id = Request.Querystring("id")<BR>headline = Request.Form("headline")<BR>newsitem = Request.Form("newsitem")<BR>delete = Request.Querystring("delete")<BR><BR>if delete="yes" then<BR><BR>deleteSQL = "DELETE News.* FROM News WHERE ID = "& ID<BR><BR>%&#062;<BR><BR>The news item has been succesfully deleted.<BR><BR>&#060;%<BR><BR>else<BR><BR>ChangeS QL = "UPDATE News SET Headline = &#039" & headline & "&#039 WHERE ID = "& ID<BR>NewsItemSQL = "UPDATE News SET NewsItem = &#039" & newsitem & "&#039 WHERE ID = "& ID<BR><BR>conn.execute(ChangeSQL)<BR>conn.execute( NewsItemSQL)<BR><BR>%&#062;<BR><BR>The changes have been made.<BR><BR>&#060;%<BR><BR>end if<BR><BR>%&#062;

  2. #2
    Espen ( Guest

    Default RE: ASP Newbie help

    I think maybe your problem is located in the url you are using.<BR><BR>Instead of<BR>http://cn23/btfc/admin/doneedit.asp?delete=yes,id=7<BR><BR>you should use<BR>http://cn23/btfc/admin/doneedit.asp?delete=yes&id=7<BR><BR>When retrieving several querystrings you must use & to separate them.<BR><BR>Espen

  3. #3
    Join Date
    Dec 1969

    Default RE: ASP Newbie help

    Is it that when you want to execute the firt part, the first as well as the second part is executed??? and when you want to execute the second part, only the second part gets executed???

  4. #4
    Chris P Guest

    Default RE: ASP Newbie help

    from reading your code, you are not "executing" the SQl statement... maybe thats why it isnt working ?

Posting Permissions

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