HI!
I am loading distinct Names from a field in a Contractors table to populate a drop down menu, which when you make a choice it will ultimately populate the contractors field in the Projects table. The drop down menu is being populated fine, But when I choose an option and press submit it is truncating that option at the first space. It is making no sence to me...
Here is the code:
<%
set connection = server.createobject("ADODB.Connection")
connection.open session("DBConnString")
sql = "select distinct C_Name from Contractors"
sql = sql & " order by C_Name DESC"
set rs = connection.execute(sql)
%>
<select class="Fieldvalue" size="1" name="Contractor">
<option value="" selected>Select Contractor</option>
<%
While Not rs.EOF
C_Name = rs("C_Name")
response.Write "<option value=" & C_Name & ">" & C_Name & "</option>"
counter = counter +1
rs.MoveNext
Response.Flush()
WEND
%>
</select>
In the action file:
Contractor = Upload.form("Contractor")
I chose not to do a replace(trim(Upload.form("Contractor")),"'","''") because I thought that maybe that was trimming it. Still keeps truncating the Contractor Name.
If I have to hard code the options in the drop down it is goingto defeat the purpose of the client being able to add their contractors to the DB.
Also, Just to be safe I wiped out the Contractors table, compressed and repaired the DB, than reentered the data through the admin interface.
Any Ideas??
Thanks,
Kris912
I am loading distinct Names from a field in a Contractors table to populate a drop down menu, which when you make a choice it will ultimately populate the contractors field in the Projects table. The drop down menu is being populated fine, But when I choose an option and press submit it is truncating that option at the first space. It is making no sence to me...
Here is the code:
<%
set connection = server.createobject("ADODB.Connection")
connection.open session("DBConnString")
sql = "select distinct C_Name from Contractors"
sql = sql & " order by C_Name DESC"
set rs = connection.execute(sql)
%>
<select class="Fieldvalue" size="1" name="Contractor">
<option value="" selected>Select Contractor</option>
<%
While Not rs.EOF
C_Name = rs("C_Name")
response.Write "<option value=" & C_Name & ">" & C_Name & "</option>"
counter = counter +1
rs.MoveNext
Response.Flush()
WEND
%>
</select>
In the action file:
Contractor = Upload.form("Contractor")
I chose not to do a replace(trim(Upload.form("Contractor")),"'","''") because I thought that maybe that was trimming it. Still keeps truncating the Contractor Name.
If I have to hard code the options in the drop down it is goingto defeat the purpose of the client being able to add their contractors to the DB.
Also, Just to be safe I wiped out the Contractors table, compressed and repaired the DB, than reentered the data through the admin interface.
Any Ideas??
Thanks,
Kris912