Hi, can anyone tell me how to remove the extra line break when using this code:
If i put the following in a textbox:Code:Dim str As String = SerialTextBox.Text.Replace(" ", vbCrLf).Replace(vbTab, vbCrLf) For Each s As String In str Dim query As String = "INSERT INTO SerialNumbers (Serial) VALUES ('" & s & "')" Dim adapter As New OleDbDataAdapter(query, con1) Dim dt As New DataTable("SerialNumbers") adapter.Fill(dt) adapter.Update(dt) con1.Close() Next
1
2
3
it gets input into the database as
1
2
3
instead of
1
2
3




Reply With Quote