It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Problem with .net for next

Moderator: dafunkymunky

Problem with .net for next

Postby Caligula on Thu Dec 29, 2011 1:51 pm

I there i have this code


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
 
Posts: 15
Joined: Fri Apr 22, 2011 8:38 pm

Who is online

Users browsing this forum: No registered users and 2 guests