2014-03-06 3 views
0

QickBooks 온라인 API 버전 3을 사용 중입니다 .net 용 nuget 패키지를 다운로드했습니다. 이름에 포함 된 인용 부호가있는 고객을 찾으려고합니다. . 오류를 반환합니다. 이 코드는 인용 부호가없는 고객에게 적용됩니다.빠른 설명서 온라인 API 3.0에 묻힌 인용문

쿼리가 작동하도록 견적을 어떻게 이스케이프합니까? ''및 '\'시도했습니다. 또는 고객을 이름으로 검색 할 수있는 다른 방법이 있습니까? 예 : 상기의 DataService에 방법, 또는하여 QueryService 개체는

List<Customer> findCustomer = new List<Customer>(); 

String customerName = "Ruby's Diner"; 

String query = String.Format("Select * From Customer Where DisplayName='{0}'", customerName); 

try 
{ 
    QueryService<Customer> customerQueryService = new QueryService<Customer>(this.ServiceContext); 
    findCustomer = customerQueryService.ExecuteIdsQuery(query).ToList(); 

} 
+0

[DisplayName = \ "{0} \" "'? –

+0

가능한 [쿼리 필터에서 작은 따옴표를 이스케이프하는 방법] (http://stackoverflow.com/questions/22185857/how- 인용 필터에서의 싱글 이스케이프) –

+0

\ "{0} \"시도가 성공하지 못했습니다. – user3158212

답변