lr資料庫參數化取數:The query result is empty and same is the parameter file問題原因

來源:互聯網
上載者:User

標籤:

出現這個問題的原因:

是因為我們的查詢結果存在中文

如果查詢結果沒有中文,顯示正常

解決辦法:

建立一個資料來源:

重新再選擇這個資料來源,重新查詢:

說明不是連接字串的問題或者是mysql驅動的問題

 

問題2:Data Retriever failed to execute query解決方案

 

問題現象:

所有的環境都一樣,僅僅只是兩條sql語句不一樣:

select ProductName from SP_Product where ProductName=‘力士恒久嫩膚嬌膚香皂115g‘  這一句執行:

 

 

select ProductName from SP_Product where ProductName=‘心味果園 200g鹽焗青豆‘   該sql執行報上說錯誤

 

解決思路:

  1. 先要確保這條sql可以查詢到資料

  2. 確保資料庫驅動和普通漢字格式的編碼都沒問題

  3. 嘗試其他sql語句,例如帶有空格的,漢字的,數字,英文的嘗試

  4. 最後如果還是沒有解決,可能是某些字的中文編碼偏差導致的,mysql的編碼比一般的範圍小

select ProductName from SP_Product where ProductName=‘心味果園 200g鹽焗青豆‘

select ProductName from SP_Product where ProductName like ‘心味果%‘

select ProductName from SP_Product where ProductName like ‘心味果園 200g%‘

一個字一個字的嘗試:

總結:對於是某些字的中文編碼偏差導致的,用like代替繞過

問題解決完畢:

 

 

lr資料庫參數化取數:The query result is empty and same is the parameter file問題原因

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.