Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If statement not complete.... writing to DB??

Status
Not open for further replies.

DavidPook

Instructor
May 9, 2003
11
BR
Guys,

Would really appreciate some help regarding this.

I am a newbie to ASP, and have really only shuffled around with playing and changing various bits, so i am not that familar with the terminology as well...ok........ here is my problem.

I have a html page, that has a drop down list with choices in it. When a user selects something from the list, they then click on the submit button. It works.

However, when i look in my access2000 database... All the information is recorded EXCEPT the listed choice !!!???....

Why is this?....... here is the code in the ASP page that i have put in, but not entirely sure if this is correct or perhaps isnt enough

if request.form("Module 1 - Basic Concepts of IT") = 1 THEN method="POST"

Is there anyone out there willing to offer some advice etc PLEASE ?

Thanks guys
 
I'm a little confused as to what you are trying to do...

When you write you insert statement, the select would be like this...

sql = "INSERT INTO myTable (selectField) VALUES ('" & request("selectFieldName") & "'"

objCN.execute (sql)


I suggest you rename the field from "Module 1 - Basic Concepts of IT" to something w/ no spaces, just so you know that the error is not there...

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rich Cook
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top