title: Multiple sms send in AT commands VB.NET
body: <p>I'm trying to send many or bulk sms using AT Command. I try send all number inside the datagrid but only first number is sending. </p>
  
  <p>this is my code</p>
  
  <pre><code>    Dim sql As New MySqlDataAdapter("select StudentID, StudentName,StudentContact, DueDate  FROM issue inner join student on student.StudentID = issue.Student  ", conn)
       Dim ds As New DataSet
      sql.Fill(ds, 0)
      For i As Integer = 0 To ds.Tables(0).Rows.Count - 1
          Dim wholenum As String
          Dim wholesms As String
          wholenum = ds.Tables(0).Rows(i).Item(2).ToString
          wholesms = "Hello " &amp; ds.Tables(0).Rows(i).Item(1).ToString &amp; ",  this is your Due Date  " &amp; ds.Tables(0).Rows(i).Item(3).ToString &amp; " pls return it on your due date"
  
          If SerialPort1.IsOpen Then
              Try
                  With SerialPort1
                      .Write("AT" &amp; vbCrLf)
                      .Write("AT+CMGF=1" &amp; vbCrLf)
                      .Write("AT+CMGS=" &amp; Chr(34) &amp; wholenum &amp; Chr(34) &amp; vbCrLf)
                      .Write(wholesms &amp; Chr(26))
  
  
  
                      MsgBox("Success sa SEND")
  
  
                      'update one 
  
                      'Call ConnectDatabase()
                      'com = New MySqlCommand("UPDATE issue SET Sent='1' ", conn)
                      'com.ExecuteNonQuery()
                      'Call DisconnectDatabase()
  
                  End With
  
              Catch ex As Exception
                  MsgBox("Bad Signal or No load")
              End Try
  
          Else
              MsgBox("Pls insert a modem")
          End If
  </code></pre>
  
  <p>I think the looping is working 'cuz it apppears the successful message of how many inside in the datagrid view. But it only send the first number.</p>