Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Dim dr As SqlDataReader = Nothing
Using con As SqlConnection = CONCETA_DB()
Try
con.Open()
Dim strCmd As String = "SELECT USUARIOS.LOGON FROM CONFIGURACOES_EMPRESA "
strCmd += "INNER JOIN USUARIOS ON CONFIGURACOES_EMPRESA.ID_EMPRESA = USUARIOS.ID_USUARIO"
strCmd += " WHERE CONFIGURACOES_EMPRESA.RazaoSocial ='" & cbxEmpresa.Text & "'"If dr.HasRows Then
If dt.Rows.Count >= 1 Then
For i = 0 To dt.Rows.Count - 1
cbxUsuario.Items.Add(dt.Rows(i).Item("LOGON"))
Refresh()
Next
Else
MsgBox("Nenhum usuario encontrado")
End If
End If
Catch
MsgBox("Erro com a sua base de dados, detalhes.: " & vbCrLf & vbCrLf & Err.Description & vbCrLf & vbCrLf & "Informe de ao suportes", MsgBoxStyle.Information)
Finally
con.Close()
End Try
End Using
=====================================================================================================
como eu limpo o que nao esta com outro ID de empresa
Carregando comentários...