Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Nombres]
- Adrian
- Alfoso
- Saul
- Diana
- Juan
- Ramon
- Try
- RSSelect.Open("SELECT ...", ConnSql3, CursorTypeEnum.adOpenStatic, LockTypeEnum.adLockOptimistic)
- Dim colcombo As DataGridViewComboBoxColumn = CType(DataGridView1.Columns("ResponsableCortoPlazo"), DataGridViewComboBoxColumn)
- For i = 1 To RSSelect.RecordCount
- colcombo.Items.Add(RSSelect.Fields(0).Value)
- RSSelect.MoveNext()
- Next
- Catch ex As Exception
- RSSelect.Close()
- MessageBox.Show("Error: " & ex.Message)
- End Try
- RSSelect.Close()
- Try
- RSBuscar.Open("Select ...", ConnSql3, CursorTypeEnum.adOpenStatic, LockTypeEnum.adLockOptimistic)
- If RSBuscar.EOF Then
- Me.DataGridView1.Rows.Add()
- oMCColBut.Visible = False
- RSBuscar.Close()
- Else
- For i = 1 To RSBuscar.RecordCount
- DataGridView1.Rows.Add(RSBuscar.Fields(2).Value, RSBuscar.Fields(3).Value, RSBuscar.Fields(5).Value,
- RSBuscar.Fields(0).Value, RSBuscar.Fields(6).Value, RSBuscar.Fields(4).Value)
- RSBuscar.MoveNext()
- Next
- RSBuscar.Close()
- End If
- Catch ex As Exception
- MsgBox(ex.Message)
- End Try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement