Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write a multiline textbox to a dataset 1

Status
Not open for further replies.

cmn2

Programmer
Mar 6, 2003
73
US
Hello

I would like to take each individual line of text from a multiline textbox and put it into a 1 column dataset where each text line would be a row within the dataset. Does anyone have an idea how to best accomplish this?

Thanks for any help you can lend.
 
Code:
        For Each s As String In TextBox1.Lines
            Dim r As DataRow = MyDataSet.Tables("SomeTable").NewRow
            r.Item("SomeColumn") = s
            MyDataSet.Tables("SomeTable").Rows.Add(r)
            r = nothing
        Next
 
So simple and just what I needed!
Thanks RiverGuy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top