You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcObjects 3rd Party IDE (C++, VB, C#, Delphi, etc.) forum

QueryFilter Error With Comma in .NET   Marty Earwood Feb 11, 2010
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject QueryFilter Error With Comma in .NET 
Author Marty Earwood 
Date Feb 11, 2010 
Message Hello. I am programmatically validating the attribute tables of a Access PGDB where the query paramaters are being parsed from a csv text file in the format of: UNIQUE_ID,FCLASS,SQL_Query,ErrorMessage. The SQL_Query is parsed to the queryfilter.whereclause. The trouble I am having is with a text field query that contains a comma:

[CopyRightDate] <> ‘Copyright 2007. MyCorporation, U.S.A.’

When in Arcmap, using the select by attributes returns the errors that I am looking for, however, when running the query programmatically it returns an invalid sql error. I found that if I replace the comma with a ? it works fine. Does anyone know how I can keep the query in it’s current format in csv file, keeping the comma?