Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Datatable.Select() expression string

Status
Not open for further replies.

daughtd

Programmer
Sep 6, 2006
15
US
I can’t figure what is wrong with this code:

DataRow[] rowArray = new DataRow[tempTable.Rows.Count];
String expression = "ID != " + index.ToString();
rowArray = tempTable.Select(expression);

I get an error stating: “Cannot interpret token '!' at position 4.”

How should I write the expression string?
 
Try "<>" rather than "!="


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top