[RESOLVED] FOR [jmcilhinney] question for LISTVIEW
Dim SELMonthPeriod As New OleDb.OleDbCommand("SELECT TimeIn,TimeOut FROM (Time_IN_OUT) WHERE EmpNo = '" & ListEmp.SelectedItem & "' and ShiftMonth = '" & ComboPeriod.SelectedItem & "'", con)
Dim READMonthPeriod As OleDb.OleDbDataReader = SELMonthPeriod.ExecuteReader()
having this code.. can you me how can i show the data selected in ListView??
Thanks.
Re: FOR [jmcilhinney] question for LISTVIEW
Thread moved from CodeBank forum (which is for you to post your code examples, not questions)
Re: FOR [jmcilhinney] question for LISTVIEW
Try this
vb.net Code:
Dim lvwItem As New ListViewItem()
Dim sSQL As String = String.Empty
sSQL = "SELECT TimeIn,TimeOut FROM (Time_IN_OUT) "
sSQL = sSQL & "WHERE EmpNo = '" & ListEmp.SelectedItem & "' "
sSQL = sSQL & and ShiftMonth = '" & ComboPeriod.SelectedItem & "'"
Dim SELMonthPeriod As New OleDb.OleDbCommand(sSQL, con)
Dim READMonthPeriod As OleDb.OleDbDataReader = SELMonthPeriod.ExecuteReader()
While READMonthPeriod.Read()
lvwItem = ListView1.Items.Add(READMonthPeriod.GetString(0))
lvwItem.SubItems.Add(READMonthPeriod.GetString(1))
End While
Re: FOR [jmcilhinney] question for LISTVIEW
Thanks.. I dont understand why "si the geek" post nonsense replies. Anyway thanks Hack, I think jmcilhinney is busy today... Thanks guys
Re: FOR [jmcilhinney] question for LISTVIEW
si_the_geek did not post a nonsense reply.
You originally opened this thread in the Visual Basic.NET CodeBank section. Not in this section. The CodeBank is not a section for questions. It is a section for members to post code they wish to share with other members.
As such, he moved your thread to this section, which is for questions.
In fact, he and I moved it at exactly the same time. He just beat me by a couple of seconds otherwise, that post would have come from me instead. :)
In addition, it is standard policy for all Mods to post something like si_the_geek posted so that the member will know who moved their thread.
Also, if you consider your question answered, then I ask help us out by pulling down the Thread Tools menu and clicking the Mark Thread Resolved menu item. That will let everyone know that you have your answer.
Thank you. :)
Re: FOR [jmcilhinney] question for LISTVIEW
oh I see... Im very sorry, i didnt understand what he or she means... Anyway thanks.. next time i'll obey the policies...