Results 1 to 6 of 6

Thread: [RESOLVED] FOR [jmcilhinney] question for LISTVIEW

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2008
    Location
    Philippines
    Posts
    70

    Resolved [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.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: FOR [jmcilhinney] question for LISTVIEW

    Thread moved from CodeBank forum (which is for you to post your code examples, not questions)

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: FOR [jmcilhinney] question for LISTVIEW

    Try this
    vb.net Code:
    1. Dim lvwItem As New ListViewItem()
    2. Dim sSQL As String = String.Empty
    3. sSQL = "SELECT TimeIn,TimeOut FROM (Time_IN_OUT) "
    4. sSQL = sSQL & "WHERE EmpNo = '" & ListEmp.SelectedItem & "' "
    5. sSQL = sSQL & and ShiftMonth = '" & ComboPeriod.SelectedItem & "'"
    6. Dim SELMonthPeriod As New OleDb.OleDbCommand(sSQL, con)
    7. Dim READMonthPeriod As OleDb.OleDbDataReader = SELMonthPeriod.ExecuteReader()
    8.  
    9. While READMonthPeriod.Read()
    10.     lvwItem = ListView1.Items.Add(READMonthPeriod.GetString(0))
    11.     lvwItem.SubItems.Add(READMonthPeriod.GetString(1))            
    12. End While

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jun 2008
    Location
    Philippines
    Posts
    70

    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

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    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.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jun 2008
    Location
    Philippines
    Posts
    70

    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width