CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 multiselect listbox

Print topic Send  topic

Author Message
charles
Posted: 12/31/2003, 7:31 PM

Hi,
Can Someone help with this. No values are inserted into the Db when i tried
to use the multiselect listbox.
I need all the values i select from a listbox to be comma separated and
inserted in the coresponding Db column.
Regards,
Charles

Jeff Stuart
Posted: 01/01/2004, 7:42 AM

charles wrote:
> Hi,
> Can Someone help with this. No values are inserted into the Db when i
> tried to use the multiselect listbox.
> I need all the values i select from a listbox to be comma separated and
> inserted in the coresponding Db column.
> Regards,
> Charles

Since you don't say what language you're using, I'm going to describe what I
did in PHP.

I created the multi select list box. Then on my before insert and before
update events, I added a custom code event for each. I then used the PHP
implode function to convert the array into a comma seperated string. This
is what gets stored into the database. Then when I pull it back out, I
create a before show event for the list box and use the PHP function
explode to change the string to an array. Note: this code will also work
for check boxes too.

--
Jeff Stuart
jstuart@computer-city.net
charles
Posted: 01/01/2004, 6:04 PM

Thanks Jeff,
I am using ASP do you know how i go about this in ASP?
"Jeff Stuart" <jstuart@computer-city.net> wrote in message
news:bt1f5v$glc$1@news.codecharge.com...
> charles wrote:
> > Hi,
> > Can Someone help with this. No values are inserted into the Db when i
> > tried to use the multiselect listbox.
> > I need all the values i select from a listbox to be comma separated and
> > inserted in the coresponding Db column.
> > Regards,
> > Charles
>
> Since you don't say what language you're using, I'm going to describe what
I
> did in PHP.
>
> I created the multi select list box. Then on my before insert and before
> update events, I added a custom code event for each. I then used the PHP
> implode function to convert the array into a comma seperated string. This
> is what gets stored into the database. Then when I pull it back out, I
> create a before show event for the list box and use the PHP function
> explode to change the string to an array. Note: this code will also work
> for check boxes too.
>
> --
> Jeff Stuart
> jstuart@computer-city.net

Jeff Stuart
Posted: 01/01/2004, 9:17 PM

charles wrote:
> Thanks Jeff,
> I am using ASP do you know how i go about this in ASP?
> "Jeff Stuart" <jstuart@computer-city.net> wrote in message
>news:bt1f5v$glc$1@news.codecharge.com...
>> charles wrote:
>> > Hi,
>> > Can Someone help with this. No values are inserted into the Db when i
>> > tried to use the multiselect listbox.
>> > I need all the values i select from a listbox to be comma separated and
>> > inserted in the coresponding Db column.
>> > Regards,
>> > Charles
>>
>> Since you don't say what language you're using, I'm going to describe
>> what
> I
>> did in PHP.
>>
>> I created the multi select list box. Then on my before insert and before
>> update events, I added a custom code event for each. I then used the PHP
>> implode function to convert the array into a comma seperated string.
>> This
>> is what gets stored into the database. Then when I pull it back out, I
>> create a before show event for the list box and use the PHP function
>> explode to change the string to an array. Note: this code will also work
>> for check boxes too.

Do something similar. No clue if Asp has implode and explode functions
which will convert an array into a single string and the reverse. If so,
use that. If not, you can write functions that do what.

--
Jeff Stuart
jstuart@computer-city.net

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.