Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 21st, 2004, 10:35 AM
Registered User
 
Join Date: Nov 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to use DataTable.Select

I am not sure how to use the Select-method in the class DataTable. Selecting rows where certain columns have specific values is pretty straightforward
myTable.Select("FirstName = 'John'");

What should i put in there to select all rows where FirstName is blank (empty cell)?

In addition to the answer to this question I would also greatly appreciate a link to a site that explains the syntax for this filter expression (i have tried the msdn-library, but i can read there for hours without finding the answer i'm looking for).
 
Old December 21st, 2004, 06:48 PM
Kep Kep is offline
Authorized User
 
Join Date: Aug 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could try "ISNULL(FirstName, '') = ''".

You can find a discussion on the syntax in the MDSN library under DataColumn.Expression property.

Or at Microsoft Developer Network.


Kep.
 
Old December 22nd, 2004, 04:28 AM
Registered User
 
Join Date: Nov 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, that worked kep. Thanks a lot!





Similar Threads
Thread Thread Starter Forum Replies Last Post
DataTable.Select() method bug jpichler C# 3 October 5th, 2009 12:24 PM
Datatable Limno .NET Framework 1.x 0 May 28th, 2008 02:37 PM
Problem with DataTable ayazhoda ASP.NET 1.x and 2.0 Application Design 1 April 8th, 2007 10:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.