PDA

View Full Version : Load/Save multiple select fields


Opel_Corsa
04-13-2007, 02:03 PM
I have a select field with the multiple option enabled. I'm wondering how do the selections get saved in the SQL db? It doesn't look like the values are comma-delimited because when I save only the first one among all the selections is stored in the db.

Also I'm wondering how I can load the multiple values from SQL into the select box? I was thinking maybe Jscript would be the way to go but not sure...

Any help is appreciated.

johnz
04-13-2007, 06:21 PM
I kind of understand what you want to do, but I need some more details on exactly what you are trying to do.

Opel_Corsa
04-14-2007, 03:54 AM
Assume I have a multiple select list:
A
B
C
D

When I select C and D I'm wondering how they get stored in my SQL db? I would ideally want them to be saved as "C, D" (comma-delimited). I don't think that's how it happens though so I guess I'd need a Jscript to put the selections next to each other with a comma in between.

Also I'm wondering how I can load the multiple values from SQL into the select box? I was thinking maybe Jscript would be the way to go but not sure...
I have already figured that out in Jscript; however I had to make an assumption that the values in the SQL db were comma-delimited like C, D.

I hope it is more clear now.