Results 1 to 2 of 2

Thread: Help!

  1. #1

    Thread Starter
    Addicted Member Skeen's Avatar
    Join Date
    Jul 2000
    Location
    Abingdon, Oxon
    Posts
    138

    Unhappy

    Hiyas

    Can anyone tell me whats wrong with my code? I have a drop down box on a page where by the user must select an option and click the submit button. The default option in the box is "-------Select-------", and the list is all the client names stored in my database. If the user clicks on the submit button without selecting a customer name I am using "response.redirect" to birng up an error page, however I'm getting an error message :

    "Response Object Error - 'ASP 0156:80004005' "
    I'm using VBScript, and I've used the exact same method in other areas of my database's front end successfully - but I'm obviously missing something here - can anyone help,

    Heres the suspect code:

    cm1SQL = "SELECT Customer_ID FROM Address_Details " _
    & " WHERE Client_Name = '" & ClName & "' "

    Set rsCID = cnAcqAcc.Execute(cm1SQL)
    If rsCID.EOF Then Response.Redirect "sorry3.asp"
    rsCID.MoveFirst
    CID = rsCID("Customer_ID")

    Where the variable ClName is th value selected in the text box of the previous page.

    Cheers 'n' Beers

    Skeen
    "It wasn't the booze that made me snooze, It was the Gin that did me in!"

  2. #2

    Thread Starter
    Addicted Member Skeen's Avatar
    Join Date
    Jul 2000
    Location
    Abingdon, Oxon
    Posts
    138

    By Jove - I think I've got it!

    I've solved the problem - it was a response.write at the top of the script to display the text variable ( just so I could see it was being pulled through) and it was pre writing the http headers

    Sorry Chaps

    Skeen
    "It wasn't the booze that made me snooze, It was the Gin that did me in!"

Posting Permissions

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



Click Here to Expand Forum to Full Width