k3nnt0ter0's Profile
Reputation: 0
Apprentice
- Group:
- Active Members
- Active Posts:
- 181 (0.15 per day)
- Joined:
- 16-January 10
- Profile Views:
- 2,036
- Last Active:
May 14 2013 07:07 AM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Latest Visitors
-
Michael26 
08 Mar 2013 - 09:54 -
rgfirefly24 
02 Oct 2012 - 12:14 -
Martyr2 
08 Aug 2012 - 19:12 -
H3R3T1C 
24 Jun 2012 - 08:02 -
Wix 
17 May 2012 - 21:59
Posts I've Made
-
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.
Anyway.
This is what I have done.
Dim myRow As DataRow For Each myRow In dt2.Rows lvPayment.Items.Add(myRow.Item("dPaid")) 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")) Next
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. -
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.

Here's my database.

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 con.Open() 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") lvPayment.Clear() dt2 = ds2.Tables("dPaid") Dim myRow As DataRow For Each myRow In dt2.Rows lvPayment.Items.Add(myRow.Item(0)) 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)) Next con.Close() 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 con.Close() -
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. -
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.
Thanks!! -
In Topic: Insert Into Statement
Posted 15 Mar 2013
Again. Thanks to you sir!
My Information
- Member Title:
- D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
Friends
k3nnt0ter0 hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
k3nnt0ter0 has no profile comments yet. Why not say hello?