Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2004, 01:39 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default Combo box doesnot accept the selection

 hello sir,
 I have combo box with an selected options like USA,Australia etd
 When I select say USA. Then I try to save this on SQL database. I hit save. When I hit save on loading the the selected USA option is cleared from the combo box. I donot understand why the code I wrote is as follow. Actually there are several combo boxes with different options. Some the code I have writteen is fro controls

  if Request.Form("txtMode")= "C" then
     if Request.Form("txtID")="" then
     objRST.AddNew()
     end if
      strFName=Request.Form("txtFName")//not a combo box works fine
      strLName=Request.Form("txtLName")// not a combo box works fine
      strBirthDate=Request.Form("txtBDate") // not a combo box works f
      strHireDate=Request.Form("txtHDate")//not a combo box works fine

      strAddress = Request.Form("txtAddress")not a combo box works fine

      strMgrName = Request.Form("ReportsTo")
      strCity = Request.Form("txtCity")
      strPostal=Request.Form("txtPostal")
      strTitle=Request.Form("OPinionasp")//combo box doesnot work
      strRegion= Request.Form("txtRegion")//combo box doesnot work
      strCountry=Request.Form("txtCountry")// combo box doesnot work
      strTitleOfCourtesy=Request.Form("ASPOpinion")//combobox doesnot work
      strReportsTo = Request.Form("Manager")// combo box doesnot work

      objRST.Fields("FirstName")=strFName
      objRST.Fields("LastName")=strLName
      objRST.Fields("BirthDate")=strBirthDate
      objRST.Fields("HireDate")=strHireDate
      objRST.Fields("Address") = strAddress

      objRST.Fields("City")=strCity
      objRST.Fields("PostalCode")=strPostal
      objRST.Fields("Title")=strTitle
      objRST.Fields("TitleOfCourtesy")=strTitleOfCourtes y
      objRST.Fields("Region")=strRegion
      objRST.Fields("Country")=strCountry
      objRST.Fields("ReportsTo")=strReportsTo
      objRST.Update()
      end if


 
Old August 11th, 2004, 08:07 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello Shoakt,

  May be you didnt give value for the option tags in the select control

<select name="txtCountry">
   <option value="USA">USA</option>
   <option value="Australia">Australia</option>
</select>

When you submit the form the value property is submitted to the page.

May be this is the problem.

 
Old August 13th, 2004, 06:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Can you post the part of code that was written to display combo box?

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
add drop down / combo box for selection mamuco Classic ASP Components 0 May 30th, 2007 06:34 PM
Query based on combo box selection help Elain Access 1 January 3rd, 2006 11:33 PM
Combo Box -1 Selection Little Shell VB.NET 2002/2003 Basics 5 June 14th, 2005 06:16 PM
Form's combo text box selection drives pull of a s pkaptein1 Access 3 May 5th, 2005 06:24 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.