Solved

Statusbar Panel Problem

Posted on 2004-09-23
5
185 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get the selected ValueMember of Combobox 5 39
VB.net Open Folder in Windows Explorer 3 51
Visual studio 2015 1 21
Access Schema 6 25
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 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