Wrox Programmer Forums
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 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 July 15th, 2005, 05:23 AM
Authorized User
Join Date: Apr 2005
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to EricJ
Default Dataset.Table.Select Method

I would like to know if it would be possible to add the "WHERE" clause in the Dataset.Table.Select Method as I keep on getting exceptional errors while trying to run this?

Old July 15th, 2005, 02:31 PM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

You don't need to include the "WHERE" in your select criteria. You just provide the criteria:

"id = 5"

"price between 5 and 10 and color='blue'"


Here's the System.Data.DataTable.Select() method documentation:

Old September 25th, 2005, 09:36 AM
Registered User
Join Date: Sep 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts


Row filter may be the good solution.
Just check it

My sample coding is

' dim _dt as new DataTable
' Hi I assumed that _dt is DataTable.
Dim strRowFilter As String
strRowFilter = _dt.Columns("Date").ColumnName & " = '" & dtpSearch.Value.Date & "'"
_dt.DefaultView.RowFilter = strRowFilter

This will filter the records.

Difficult can be done immediately. But Impossible will take some more time.

Similar Threads
Thread Thread Starter Forum Replies Last Post
DataTable.Select() method bug jpichler C# 3 October 5th, 2009 12:24 PM
SubQueries in a select statement in dataset madhusrp Reporting Services 1 February 22nd, 2007 03:03 AM
onChange method of <select> in Html not working pushpa Classic ASP Databases 4 January 23rd, 2007 11:20 AM
c# method Select() twb C# 0 November 18th, 2006 02:59 PM
How to use the DELETE method in a DataSet thomaz C# 2 January 10th, 2004 02:28 PM

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