Solved

Compare values in datatable using asp.net

Posted on 2006-07-21
2
238 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now