Quickbooks api v3过滤报价

时间:2014-03-08 00:19:53

标签: vb.net quickbooks

我有一个名字='9“的项目 - 香槟'在线快速书。 但如果我使用的方法,我使用它不返回任何东西,只有带引号的项目名称才会发生。

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)

如何处理此声明中的特殊报价?

1 个答案:

答案 0 :(得分:0)

双引号的转义是另一个双引号,所以试试:

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

编辑:Hrmm ..

你有没有尝试过:

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

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

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

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

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

实际上..你试过url编码整个字符串吗?

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