Solved

Compare values in datatable using asp.net

Posted on 2006-07-21
2
241 Views
Last Modified: 2008-01-09
I want to test to see if the time in date changes.  If it does i want to write out a blank line.   I can write out a blank line just fine but I need to know how to compare the timein values to see if they change each time.

Thank you


dim query
query="select eh.recordid, firstname + ' ' +  lastname as name, timein, timeout, description from employeehours as eh inner join employeelist as el on eh.employeeid = el.employeeid inner join masterjobcodelist as mjc on eh.jobcode = mjc.jobcode where firstname = 'Justine' and lastname = 'Cleary' and timein  > CONVERT(datetime, '" & strCurrentdate & "', 102) order by timein "
                 
 Dim da As SqlDataAdapter = New SqlDataAdapter(query, objconn)
dim Tbl = new DataTable()
da.Fill(Tbl)
Tbl.columns.add("columnNames")
dim i
dim cou as integer = Tbl.Rows.count()
dim objRow as datarow
'Get the time in date
                                       
while i <> cou
   ' Adding rows
   objRow = Tbl.newrow()
   'objRow("columnNames") = ...
   Tbl.rows.add(objRow)
   i = i + 1
end while

dgAddressBook.DataSource = Tbl        
dgAddressBook.DataBind()
0
Comment
Question by:running32
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 17160863
And, what is happening with this code?

Bob
0
 

Author Comment

by:running32
ID: 17171323
I took your advice prior and when with a dataset.

Thanks
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 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