Private Sub SMSPort_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles comPort.DataReceived Dim str As String = "" Dim temp As String = "" objCon.GetConnectionString() If e.EventType = SerialData.Chars Then SMSPort.DtrEnable = True System.Threading.Thread.Sleep(100) tempp = SMSPort.ReadExisting().Replace("", "").Trim() // here i want to add th split charcters ' For i As Integer = 1 To tempp.Length Step 12 ' Debug.Write(Mid(tempp, i, 12)) If tempp <> "" Then objCon.GetConnectionString() objCon.GetConnection("Insert into tblAttended(Id,Status,Date,Time)values('" + tempp.ToString() + "','In','" + System.DateTime.Today.ToShortDateString() + "','" + DateTime.Now.ToShortTimeString() + "')") ListView1.Items.Add(tempp) '<big>ERRORR</big> txtUniqueNumber.Text = tempp.Trim() ''<big>ERRORR</big> ListView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent) End If 'Next i Control.CheckForIllegalCrossThreadCalls = False End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)