Separation of texts in a text field when entering into a database

How can I split or put words in a text field on another line when pasted into MS Access (Database). For example, in my text box there are the following words: ABC DEF GHI JKL

And when the user presses the enter button, the following words will be inserted into the text box, but will each word be on a new line? For example, ABC will be on the first line, DEF will be on the second, etc. Please help me. Thank.

+3
source share
1 answer

to separate the text you should do this:

string test = "ABC DEF GHI JKL";
string[] splitedText = test.Split(' ');

To use this access :

OleDbCommand CmdSql = new OleDbCommand("Insert into [product] (Kod, [names],price,type," + 
                                       "volume,manufacturer,importer) " +
                                       "VALUES (?, ?, ?, ?, ?, ?, ?)";
0
source

All Articles