Aqui vai um exemplo de DELETE, INSERT e SELECT ao mesmo tempo:
Public Function GravaRegistros() As Boolean
Dim strDatope As String
Dim mCmd As New SqlCommand
Dim i As Short
Dim iLinhaRet As Short
Try
strDatope = varDatope.Year & "-" & varDatope.Month & "-" & varDatope.Day
mCon = New SqlConnection("Server=" & sServidorSQL & ";Database=NomeBD; Trusted_Connection=yes")
mCon.Open()
mCmd.Connection = mCon
mCmd.CommandText = "DELETE FROM TABELA"
mCmd.ExecuteScalar()
For i = 1 To UBound(AcoesBovespa) - 1
mCmd.CommandText = "insert into TABELA values ('" & AcoesBovespa(i).Codigo & "', '" & AcoesBovespa(i).Descri & "', '" & AcoesBovespa(i).Tipo & "', '" & AcoesBovespa(i).Mercado & "', '" & AcoesBovespa(i).Isin & "', '" & strDatope & "')"
mCmd.ExecuteNonQuery()
If (i Mod 100) = 0 Then
System.Windows.Forms.Application.DoEvents()
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor
End If
Next i
mCmd.CommandText = "SELECT COUNT(*) AS Total_Registros FROM TABELA"
iLinhaRet = CType(mCmd.ExecuteScalar(), Short)
If iLinhaRet > 0 Then
GravaRegistros = True
Else
GravaRegistros = False
End If
Catch sError As Exception
MsgBox(sError.ToString)
GravaRegistros = False
Finally
mCon.Close()
End Try
End Function