strConn = DBConnString.strConn
Conn = New SqlConnection()
With Conn
If .State = ConnectionState.Open Then .Close()
.ConnectionString = strConn
.Open()
End With
sb.Remove(0, sb.Length)
sb.Append("SELECT Ceme.ButtonID,Ceme.ProductID,Ceme.ButtonName")
sb.Append(" FROM Ceme ")
sb.Append(" ORDER BY ProductID")
Dim sqlce As String = sb.ToString()
com = New SqlCommand()
With com
.CommandType = CommandType.Text
.CommandText = sqlce
.Parameters.Clear()
.Connection = Conn
dr = .ExecuteReader()
If dr.HasRows Then
dtProduct = New DataTable()
dtProduct.Load(dr)
If dtProduct.Rows.Count <> 0 Then
cmdce1.Name = dtProduct.Rows(0).Item("ProductID").ToString
cmdce1.Text = dtProduct.Rows(0).Item("ButtonName").ToString
cmdce2.Name = dtProduct.Rows(1).Item("ProductID").ToString
cmdce2.Text = dtProduct.Rows(1).Item("ButtonName").ToString
cmdce3.Name = dtProduct.Rows(2).Item("ProductID").ToString
cmdce3.Text = dtProduct.Rows(2).Item("ButtonName").ToString
cmdce4.Name = dtProduct.Rows(3).Item("ProductID").ToString
cmdce4.Text = dtProduct.Rows(3).Item("ButtonName").ToString
cmdce5.Name = dtProduct.Rows(4).Item("ProductID").ToString
cmdce5.Text = dtProduct.Rows(4).Item("ButtonName").ToString
'cmdce6.Name = dtProduct.Rows(5).Item("ProductID").ToString
'cmdce6.Text = dtProduct.Rows(5).Item("ButtonName").ToString
Else