vb.net remove commas at end of address if not all fields are entered
Posted on 2012-09-07
I have to concatenate 5 fields into one string to create an address that is entered into one field in a database. When not all of the fields are entered, I get commas at the end of the string, i.e. "555 North Ave, , , " How can I removed these before saving? It is not a matter of saving to different fields...I am working with old code and old tables that already have thousands of addresses that were saved to one field and I cannot change that. I also cannot require all address fields have data. I just want the save to the one address field as clean as possible. Thanks for your help in advance.