p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: Trouble passing combobox value to Access database


Message #1 by "Chris Lundquist" <chris.lundquist@h...> on Fri, 7 Jul 2000 16:42:28
I can write the value to a page just fine but when I try to update the 

recordset the value has several spaces and four small boxes before it as 

well as four small boxes after it.  I have tried using both the Cstr and 

Trim functions to correct this problem, neither have worked.  Please offer 

any suggestions, at this point I'll try anything.  I have pasted some 

script below:



COMBOBOX:

<select name=cboManState>

     <%do while not rstState.eof%>

     <option value="

     <%=rstState("State")%>

     ">

     <%=rstState("State")%>

     </option>

     <%rstState.MoveNext

       loop

       rstState.Close

       set rstState = nothing%>



ADD/UPDATE:

rstNewManufacturer.AddNew

rstNewManufacturer.Fields("ManufacturerName") = Request.Form("txtmanName")

rstNewManufacturer.Fields("Contact") = Request.Form("txtManContact")

rstNewManufacturer.Fields("Phone") = Request.Form("txtManPhone")

rstNewManufacturer.Fields("StreetAddress1") = 

Request.Form("txtManAddress1")

rstNewManufacturer.Fields("StreetAddress2") = 

Request.Form("txtManAddress2")

rstNewManufacturer.Fields("City") = Request.Form("txtManCity")

rstNewManufacturer.Fields("State") = Request.Form("txtManState")

rstNewManufacturer.Fields("Zip") = Request.Form("txtManZip")

rstNewManufacturer.Fields("ManufacturerComments") = 

Request.Form("txaManComments")

rstNewManufacturer.Update


  Return to Index