Solved

Statusbar Panel Problem

Posted on 2004-09-23
5
178 Views
Last Modified: 2010-04-23
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
0
Comment
Question by:daverichardson
  • 3
  • 2
5 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 50 total points
ID: 12131402
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
 

Author Comment

by:daverichardson
ID: 12131924
Thanks Ronald that works great

Dave
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 12131959
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
 

Author Comment

by:daverichardson
ID: 12297530
i am sorry ronald i thought i closed this straight after your answer

Dave
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 12297584
No problem. I'm not doing it for the points anyway :-)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now