| You are here: DEVPPL ‹ Forum ‹ Programming ‹ Visual Basic Forum |
NOTIFICATIONS
|
|
|||||||||||||||
Login |
Problem with .net for next
1 post
• Page 1 of 1
0
Problem with .net for next
I there i have this code
This code allows me to get data from a table in a database and populate a combobox with it when the form loads but after the second next any code i write
the application doesn't read, like the code to puplate the second combobox. If anyone knows what the problem is, please hellp me.
Dim desinftb As New maindatabaseDataSet.MateriaisDataTable
desinftb = maindatabaseDataSet.Materiais
Dim count As Integer
count = desinftb.Rows.Count
Dim b As Integer
For b = 0 To count
Dim asc As String
asc = MaindatabaseDataSet.Materiais.Rows(b).Item(0)
matcombo.Items.Add(asc)
Next
Me.BackColor = Color.Blue
Dim desinfta As New maindatabaseDataSet.TratamentosDataTable
desinfta = MaindatabaseDataSet.Tratamentos
Dim a As Integer
Dim counttra As Integer
counttra = desinfta.Rows.Count
For a = 0 To counttra
Dim bsc As String
bsc = MaindatabaseDataSet.Tratamentos.Rows(b).Item(0)
combotrat.Items.Add(bsc)
Next
This code allows me to get data from a table in a database and populate a combobox with it when the form loads but after the second next any code i write
the application doesn't read, like the code to puplate the second combobox. If anyone knows what the problem is, please hellp me.
- Caligula
- Reputation: 0
- Posts: 15
- Joined: Fri Apr 22, 2011 9:38 pm
- Highscores: 0
- Arcade winning challenges: 0
|
|