List Box To SP

Results 1 to 2 of 2

Thread: List Box To SP

  1. #1
    Join Date
    Dec 1969

    Default List Box To SP

    I have a form with two list boxes on it. One list box is populated with values from a view. The user<BR>is allowed to make multiple selections from this list box. How this works is the user selects the value<BR>clicks the add button, remove to remove from the user selections list box. Hence, one list box to display<BR>and one that stores the selcetions that the user makes. OK, with me to this point? When the form is submitted<BR>the values need to be passed to a Stored Procedure that looks like this:<BR><BR>&#060;%<BR>set cmdFSTwo = Server.CreateObject("ADODB.Command")<BR>cmdFSTwo.A ctiveConnection = MM_connPSR_STRING<BR>cmdFSTwo.CommandText = "dbo.spSav_FallEvent_UserMedications"<BR>cmdFSTwo. CommandType = 4<BR>cmdFSTwo.CommandTimeout = 0<BR>cmdFSTwo.Prepared = true<BR>cmdFSTwo.Parameters.Append cmdFSTwo.CreateParameter("@RETURN_VALUE", 3, 4)<BR>cmdFSTwo.Parameters.Append cmdFSTwo.CreateParameter("@UEID", 3, 1,4,UEID)<BR>cmdFSTwo.Parameters.Append cmdFSTwo.CreateParameter("@MedicinetypeCode01", 3, 1,4,MedicinetypeCode01)<BR>cmdFSTwo.Parameters.App end cmdFSTwo.CreateParameter("@MedicinetypeCode02", 3, 1,4,MedicinetypeCode02)<BR>cmdFSTwo.Parameters.App end cmdFSTwo.CreateParameter("@MedicinetypeCode03", 3, 1,4,MedicinetypeCode03)<BR>cmdFSTwo.Parameters.App end cmdFSTwo.CreateParameter("@MedicinetypeCode04", 3, 1,4,MedicinetypeCode04)<BR>cmdFSTwo.Parameters.App end cmdFSTwo.CreateParameter("@MedicinetypeCode05", 3, 1,4,MedicinetypeCode05)<BR>cmdFSTwo.Parameters.App end cmdFSTwo.CreateParameter("@MedicinetypeCode06", 3, 1,4,MedicinetypeCode06)<BR>cmdFSTwo.Parameters.App end cmdFSTwo.CreateParameter("@MedicinetypeCode07", 3, 1,4,MedicinetypeCode07)<BR>cmdFSTwo.Parameters.App end cmdFSTwo.CreateParameter("@MedicinetypeCode08", 3, 1,4,MedicinetypeCode08)<BR>cmdFSTwo.Parameters.App end cmdFSTwo.CreateParameter("@MedicinetypeCode09", 3, 1,4,MedicinetypeCode09)<BR>cmdFSTwo.Parameters.App end cmdFSTwo.CreateParameter("@MedicinetypeCode10", 3, 1,4,MedicinetypeCode10)<BR>cmdFSTwo.Execute()<BR>% &#062;<BR><BR>As you can see it takes all selected items and instead of a string, it separates each one. I did not write<BR>the Stored Procedure, so I have to figure out a way for the code to work. To me, passing these values as <BR>a single string would have worked, but it is too late for that now. Any suggestions?

  2. #2
    Join Date
    Dec 1969

    Default RE: List Box To SP

    ick.<BR><BR><BR><BR>article on how to parse a delimited string, <BR>it works well (i have used it for just such a thing)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts