Set Button,text property from a Database Column

HerbsztJozsi

New Member
Hello. I am a new user. I have a form, with a few (30) buttons on it, and i must set the buttons text property from a database column. I can save the column values in an array variable, but how to assign this values easy to button1,...button30.text property..... ?
 

HerbsztJozsi

New Member
I am using Basic4ppc.

The way i am fetching the items :

Sub Globals
Public CoduriSpecii (83)
End Sub

Public Sub Kapcsolodas
con.New1
cmd.New1("",con.Value)
reader.New1
con.Open("Data Source = " & AppPath & "\Inventariere.sil")
End Sub

Public Sub GetCoduriSpeciiData
Dim i As Integer
con.BeginTransaction
cmd.CommandText = "SELECT PrescSpec FROM CoduriSpecii"
reader.Value = cmd.ExecuteReader
i=0
Do While reader.ReadNextRow = True
CoduriSpecii(i)= reader.GetValue(0)
'Msgbox(CoduriSpecii(i))
i=i+1
Loop
reader.Close
con.EndTransaction
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…