Ankit thnks... one big question over here.. with this code
"If tempp.Length > 12 Then tempp = tempp.Substring(0, 12)"
suppose 36 characters string then i can divide into 12 characters once only.. but i want to store that whole string (36 characters) into 3 differnt substring nd wnt to store into database...
kindly guide as soon as posible ...
my code is like this..
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()
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() + "')")
txtUniqueNumber.Text = tempp.Trim()
End If
Next i