PDA

Click to See Complete Forum and Search --> : Help!


Skeen
Sep 25th, 2000, 04:37 AM
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

Skeen
Sep 25th, 2000, 05:16 AM
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