k3nnt0ter0's Profile User Rating: -----

Reputation: 0 Apprentice
Active Members
Active Posts:
181 (0.1 per day)
16-January 10
Profile Views:
Last Active:
User is offline Jun 07 2013 11:11 PM

Previous Fields

Dream Kudos:

Latest Visitors

Icon   k3nnt0ter0 has not set their status

Posts I've Made

  1. In Topic: Insert Into Statement

    Posted 15 Mar 2013

    LOL. . It's not that I want you to re-write it for me. I just posted the code before I applied what you've said.


    This is what I have done.

     Dim myRow As DataRow
            For Each myRow In dt2.Rows
                lvPayment.Items(lvPayment.Items.Count - 1).SubItems.Add(myRow.Item("Amt"))
                lvPayment.Items(lvPayment.Items.Count - 1).SubItems.Add(myRow.Item("dFr").ToString("MMMM dd, yyyy") + " to " + myRow.Item("dTo").ToString("MMMM dd, yyyy"))
                lvPayment.Items(lvPayment.Items.Count - 1).SubItems.Add(myRow.Item("OrNumber"))

    I tried what you've said. I never thought of using the Column Name instead of the Index but I got an error in converting the date to string. Conversion from string "MMMM dd, yyyy" to type 'Integer' is not valid.
  2. In Topic: Insert Into Statement

    Posted 15 Mar 2013

    This is what the Code displays. Check the "Covered Date" and the "OR Number" Column. The Data are kinda rumbled. 123 and 332 should be the at the OrNumber.
    Posted Image

    Here's my database.
    Posted Image

    Here's my Entire Code for Displaying those Data.
     Dim com As OleDbCommand
            Dim oledbda As OleDbDataAdapter
            Dim ds2 As DataSet
            Dim dt2 As DataTable
            Dim str As String
            str = "SELECT dPaid, Amt, OrNumber, dFr, dTo FROM Payment WHERE Street = '" & lvFullList.FocusedItem.SubItems(2).Text & "' AND HouseNo = '" & lvFullList.FocusedItem.SubItems(1).Text & "'"
            com = New OleDbCommand(str, con)
            oledbda = New OleDbDataAdapter(com)
            ds2 = New DataSet
            oledbda.Fill(ds2, "dPaid")
            dt2 = ds2.Tables("dPaid")
            Dim myRow As DataRow
            For Each myRow In dt2.Rows
                lvPayment.Items(lvPayment.Items.Count - 1).SubItems.Add(myRow.Item(1))
                lvPayment.Items(lvPayment.Items.Count - 1).SubItems.Add(myRow.Item(2) + " to " + myRow.Item(3))
                lvPayment.Items(lvPayment.Items.Count - 1).SubItems.Add(myRow.Item(4))
            lvPayment.Columns.Add("Date of Payment", 120, HorizontalAlignment.Center)
            lvPayment.Columns.Add("Amount", 50, HorizontalAlignment.Center)
            lvPayment.Columns.Add("Covered Date", 120, HorizontalAlignment.Center)
            lvPayment.Columns.Add("OR Number", 120, HorizontalAlignment.Center)
            lvPayment.View = View.Details
            lvPayment.GridLines = True
  3. In Topic: Insert Into Statement

    Posted 15 Mar 2013

    I want to Display something like this

    March 01, 2013 TO March 31, 2013

    In my Table I got this "From" row and "To" row. In which, I am going to concatenate both of them in a single column in my Listview to display those dates.
  4. In Topic: Insert Into Statement

    Posted 15 Mar 2013

    Sir I would like to ask also how to concatenate two items of table into a single row of a listview.

    I tried this one but the I can't get the result I want which is From this Date TO that Date
    lvPayment.Items(lvPayment.Items.Count - 1).SubItems.Add(myRow.Item(2) + " to " + myRow.Item(3))

    And as per date, how do I trim the date to the like of March 15, 2013. It always shows the Time.

  5. In Topic: Insert Into Statement

    Posted 15 Mar 2013

    Again. Thanks to you sir!

My Information

Member Title:
D.I.C Head
Age Unknown
Birthday Unknown

Contact Information



k3nnt0ter0 hasn't added any friends yet.


k3nnt0ter0 has no profile comments yet. Why not say hello?