Solved

Compare values in datatable using asp.net

Posted on 2006-07-21
2
243 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

737 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