Statusbar Panel Problem

I need it add data from a dataset to a status bar panel but I just can’t figure it out, can anyone help. Below is the code I am using to fill the dataset

Dim SQLStatement As String = "SELECT department FROM TblUserName WHERE [UserName]='" & Me.txtUserName.Text & "'"
        Dim SelectCommand As New OleDb.OleDbDataAdapter(SQLStatement, OleDbConnection1)
        Dim ds As New DataSet
        SelectCommand.Fill(ds)

Thanks

Dave
daverichardsonAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
RonaldBiemansConnect With a Mentor Commented:
you mean like this

StatusBar1.Panels(0).Text = ds.Tables(0).Rows(0).Item("department")

don't forget to set the property showpanels of your statusbar to true and ofcourse to add a panel to the panels collection
0
 
daverichardsonAuthor Commented:
Thanks Ronald that works great

Dave
0
 
RonaldBiemansCommented:
Glad I could help,

But if you are using your above code just for filling the panel with the department, then there are better and faster ways to do that.

0
 
daverichardsonAuthor Commented:
i am sorry ronald i thought i closed this straight after your answer

Dave
0
 
RonaldBiemansCommented:
No problem. I'm not doing it for the points anyway :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.