Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

multiline text insert into sql db?

$
0
0

I am adding a multiline textbox that I will need to read and insert into the sql server.
The line will be delimited so I will need to split it, insert read next line, etc.

basic textbox

<asp:TextBox ID="txt_mass" runat="server" TextMode="MultiLine" Width="730px"></asp:TextBox>

textbox data would look something like:

123,4554,domain1,john.doe,domain2

49568,88733,domain5,66712,domain4


my .vb

I'm not sure how to split the data for each line and do the insert, then read the next line.

  ElseIf txt_mass.Text <> "" Then
                    cmd.CommandText = "Insert Into USERS (ID, Acct, SrcDmn, TrgtAcct, TrgtDmn, Requestor, Process) Values ('" & txt_mass.Text & "','" & myEID & "', '0')"
                    cmd.ExecuteNonQuery()

            End If




Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>