Home All Groups Group Topic Archive Search About

Working with data adapter/binding source at runtime

Author
17 Apr 2006 12:27 AM
nyk52687
I have three fields in a database, city, state, zip. I can bind each
one of these to its own label with no problem. What I want to do is
combine all three fields into one string and bind it to one label. I
was thinking I could bind each to a hidden label, then combine them at
runtime and set it to another visible label, but I was wondering if
there was an easier way to code it.

Thanks,
Chris

Author
17 Apr 2006 3:55 AM
+Vice
In your query combine them into 1 variable then bind that variable.  Voila!
:)

<nyk52***@gmail.com> wrote in message
Show quoteHide quote
news:1145233621.326827.87460@i39g2000cwa.googlegroups.com...
>I have three fields in a database, city, state, zip. I can bind each
> one of these to its own label with no problem. What I want to do is
> combine all three fields into one string and bind it to one label. I
> was thinking I could bind each to a hidden label, then combine them at
> runtime and set it to another visible label, but I was wondering if
> there was an easier way to code it.
>
> Thanks,
> Chris
>
Author
17 Apr 2006 5:52 AM
Cor Ligthert [MVP]
Chris,

You can simple add a column to your table and use than the string
concatination.

Have a look at our website. This is with a datasource, but the main is about
the concationation.

http://www.vb-tips.com/default.aspx?ID=e8fee3e3-3ca7-4bb0-81dc-f0b560f43e7c

I hope this helps,

Cor

<nyk52***@gmail.com> schreef in bericht
Show quoteHide quote
news:1145233621.326827.87460@i39g2000cwa.googlegroups.com...
>I have three fields in a database, city, state, zip. I can bind each
> one of these to its own label with no problem. What I want to do is
> combine all three fields into one string and bind it to one label. I
> was thinking I could bind each to a hidden label, then combine them at
> runtime and set it to another visible label, but I was wondering if
> there was an easier way to code it.
>
> Thanks,
> Chris
>