TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sidd
NA
3
0
select from DataTable does not return a row
Oct 9 2003 3:19 PM
First off, I know it would probably be more appropriate to put this in the ADO.NET section, however it is quite dead. Here is the problem: I can successfully insert a DataRow with a key of type System.DateTime in the DataTable, I know this because if I use a foreach on myDataTable.Select(), i can compare a DataTime to the appropriate field and a identify the row i want ie: DataTable dt = GetLogDatabase(); DateTime dtCurrent; //FIXME: stupid, stupid,stupid.... foreach (DataRow dRow in dt.Select()) { dtCurrent = (System.DateTime)dRow["event_id"]; if(dtCurrent == sdEventId) { return dRow; } } return null; (all done within a Monitor to prevent race conditions, of course) What is getting me is that this select statement dosen't do the same thing: DataRow[] drRow = dtTable.Select("event_id = '" + dtCurrent + "'"); Any ideas? The same select works for a key that is a string, so i'm not qute sure what the problem is. Thanks in advance -bryan ps:for some reason, the formatting gets screwed up when this form is submitted. sorry for the illegibility of the nested code
Reply
Answers (
1
)
How to read value of control added to asp.net table cell
HTTPS: Security within an ASP.NET application