Help with vb + ms access

ritesh21

Member
Joined
Jan 21, 2008
Messages
7
Programming Experience
Beginner
Hi,
am currently facing a problem to store values from 2 textboxes.
In the first case, i have to store the values in a table, which have separate fields for the textboxes, and in this case everything is fine.

but, i also have to store the same values in another table, but this time, the values from the 2 textboxes have to be stored in a single field. The values here are in fact texts, whereby no calculations can be dne on them.

Can anyone hlp me for this part, i.e. how to concatenate these 2 texts before storing them in the single field table...?

i already know the sql to insert in a table, only to concatenate these 2 texts which i want...thx...
 
Are you looking for something to deliminate them with you mean? I ask because I assume you know how to concatenate two strings...

Depending on what kind of text it is you can use any meta character/punctuation to separate the strings and then simply do a string.split() on the string when you pull it from the database.

The real question is...why aren't they stored seperately in the other table?
 
VB.NET:
Dim sConcat As String
sConcat = TextBox1.Text & TextBox2.Text

Concatenates the 2 text boxes.

I'd take a look at some articles dealing with string usage if this is giving you problems. Strings in .NET using VB.NET

I have to agree with jshultz that if you have any control over that database that you take a look at normalizing it.
 
Back
Top