views:

15

answers:

2

I'm trying to query a dataset from a stored-procedure but I'm making a mess somewhere..

specials.DataSource = ds.Tables["specials"].Select("mycolumnname NOT Like 'BB'%");

Any ideas whats wrong with the above statement.

+1  A: 

Percent symbol in the wrong place

specials.DataSource = ds.Tables["specials"].Select("mycolumnname NOT Like 'BB'%");

should be

specials.DataSource = ds.Tables["specials"].Select("mycolumnname NOT Like 'BB%'");
GordonB
A: 

I believe you need to include the percent sign inside the single quotes:

.Select("mycolumnname NOT Like 'BB%'");
DOK