Quickbooks api v3 filters quotation

随声附和 提交于 2019-12-13 04:24:48

问题


I have an item with name='9" Plate - Champagne' in quickbooks online. but if I use method that I use its doesn't return anything and that's happens only with item name with quotation mark.

Dim ItemQueryService As New Intuit.Ipp.QueryFilter.QueryService(Of Intuit.Ipp.Data.Item)(context)
Dim q As String = "Select * from Item where Name = '9" Plate - Champagne'"
Dim Itemlist = ItemQueryService.ExecuteIdsQuery(q)

How to handle special quotation in this statement?


回答1:


The escape for the double quote is another double quote, so try:

Dim q As String = "Select * from Item where Name = '9"" Plate - Champagne'"

Edit: Hrmm..

Did you try:

Dim q As String = "Select * from Item where Name = '9\" Plate - Champagne'"

or

Dim q As String = "Select * from Item where Name = '9\"" Plate - Champagne'"

or

Dim q As String = "Select * from Item where Name = '9"""" Plate - Champagne'"

or

Dim q As String = "Select * from Item where Name = '9" Plate - Champagne'"

or

Dim q As String = "Select * from Item where Name = '9%22 Plate - Champagne'"

Actually.. have you tried url-encoding the whole string?

Dim q As String = "Select%20*%20from%20Item%20where%20Name%20%3D%20%279%22%20Plate%20-%20Champagne%27"


来源:https://stackoverflow.com/questions/22263206/quickbooks-api-v3-filters-quotation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!