|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can any help with this?
I have a Combo Box populated by 2 fields from a MS Access DB. The values are seperated by a comma and a space. When the user selects the option I want the values to be seperated and written to a different table in the data base. How do I seperate the values. The fields are "Venue" and "City" The code that populates the combobox looks like this do while not objrsVenues.EOF Response.Write "<OPTION>" Response.Write objrsVenues("Venue") Response.Write (", ") Response.Write objrsVenues("City") objrsVenues.MoveNext loop end if objrsVenues.close The Code I have been trying to write this to the DB looks like this objrsShow_Info.AddNew 'populate new record objrsShow_Info("Start_Date") = Request.Form("Start_Date") objrsShow_Info("End_Date") = Request.Form("End_Date") objrsShow_Info("Venue") = left (Request.Form("Venue"),1) 'I think I am on the right track with this, but obviously I am only getting the first character. I need to get everything up to the first comma. objrsShow_Info("City") = Request.Form("Venue") 'here I need to get everything after the first comma and space. objrsShow_Info.Update objrsShow_Info.Close Any help would be appreciated |
|
#2
|
||||
|
||||
|
Well, you could split() on the comma, but I wonder why you don't just write directly from one table into the other using 2 recordsets, or make 2 fields for the 2 entries, to make things easier.
Or, declare variables to contain the data from the first recordset, and use the variables to display later. Then you only need one recordset at a time, and can still display the combo box in the same way, you'll just use the variables in your second recordset
__________________
--Dave-- U2kgSG9jIExlZ2VyZSBTY2lzLCBOaW1pdW0gRXJ1ZGl0aW9uaXMgSGFiZXM= Last edited by karsh44 : September 16th, 2003 at 12:43 PM. |
|
#3
|
|||
|
|||
|
Thanks for the reply Dave.
I have sent you a personal message. Cheers, James |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Can anyone help with this combox issue? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|