舉例:我在INI檔案里面寫了一天code = 4444,然后我在PB程式里面用SQL寫了欄位select * from table where code = :code;這種是直接使用,還是需要在哪里設定一下才可以?
uj5u.com熱心網友回復:
舉例:我在INI檔案里面寫了一段code = 4444,然后我在PB程式里面用SQL寫了一句 select * from table where code = :code;這種是直接使用,還是需要在哪里設定一下才可以?uj5u.com熱心網友回復:
需要先用把ini的值讀取到變數uj5u.com熱心網友回復:
-----
使用 ProfileString 讀取 code 值, 用法如下
These examples use a file called PROFILE.INI, which contains the following lines. Quotes around string values in the INI file are optional:
[Employee]
Name=Smith
[Dept]
Name=Marketing
This statement returns the string contained in keyword Name in section Employee in file C:\PROFILE.INI and returns None if there is an error. In the example, the return value is Smith:
ProfileString("C:\PROFILE.INI", "Employee", &
"Name", "None")
uj5u.com熱心網友回復:
參照樓上,需要先把組態檔里面的節資料取出來,然后再傳給你的陳述句變數uj5u.com熱心網友回復:
定義一個全域變數string gs_code,然后應用的open事件里從ini檔案里把code取出來賦值給gs_code,用ProfileString這個函式,然后再參考gs_code這個變數即可轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/24742.html
標籤:基礎類
