Inserting wrong value into database

froggy

Registered User.
Local time
Today, 14:46
Joined
Sep 15, 2006
Messages
13
Hi,

I am doing up a webpage which has a dropdown box with 13 choices(13 different department names eg. A, B, C..) to allow user to insert into database. However, instead of inserting just "department name", it insert "department name," into the database.

Eg. What i want to see in database is A but i get A, instead.

I have checked my SQL statement and there is no "," which should not have been there. Is there anywhere else i should be looking out for in order to correct this problem?

Thank you.
 
if you mean, you are retrieving the index rather than the value of the combo box(drop down box)

then instead of saying

myval = deptcombobox

you will need

myval = deptcombobox.columns(1) - this type of syntax
 
Hi,

in my dropdown box options, there are department names such as English, Maths, Science, Chinese, Music, PE etc. The primary key for this table is autonumber.
I would like to allow these different Department to add Sections.
However, when i allow my user to select from a dropdown list of English, Maths, Science, Chinese, Music, PE etc.

Eg.
In my database, under the department column, instead of "PE" i get "PE," and i will need to get rid of the "," for future use.
 
how are you getting the data INTO the dropdown box in the first place. It sounds like the commas are in the drop down list values. You need to remove the commas from there.
 
I think list box values are sparated by a semi-colon ; try that ;)
 

Users who are viewing this thread

Back
Top Bottom