From cfd8f505d700c2fbdcc1b4a73ea1a4376e254472 Mon Sep 17 00:00:00 2001 From: SeedList Date: Thu, 10 Jul 2025 10:53:30 +0800 Subject: [PATCH] vault backup: 2025-07-10 10:53:30 --- SanPinPLM/相关操作/4.0-other/200.Delphi脚本.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SanPinPLM/相关操作/4.0-other/200.Delphi脚本.md b/SanPinPLM/相关操作/4.0-other/200.Delphi脚本.md index 337b8618..33f525cb 100644 --- a/SanPinPLM/相关操作/4.0-other/200.Delphi脚本.md +++ b/SanPinPLM/相关操作/4.0-other/200.Delphi脚本.md @@ -85,7 +85,7 @@ end. #### 执行sql获取字符串 -此函数作用为执行sql语句,去获取字符串结果 +此函数作用为执行 `SQL` 语句,去获取字符串结果 案例如下 @@ -95,7 +95,13 @@ chiGetFieldValueBySql('select top 1 usr_sqlmj from pdmitem where usr_sqlmj like #### 执行sql填充下拉框 -此函数作用为执行sql语句,将获取到的结果作为下拉选项提供给下拉框,需要写入 +此函数作用为执行 `SQL` 语句,将获取到的结果作为下拉选项提供给下拉框,需要写入两个参数,第一个为 `SQL` 语句,第二个为要接收结果的控件(接收结果的控件,其 **按钮类型** 必须为 **下拉**,详见 [根据输入内容在数据库中查询,获取查询结果作为下拉列表以供选择](999.Delphi脚本记录.md#根据输入内容在数据库中查询,获取查询结果作为下拉列表以供选择) 说明 ) + +案例如下: + +```delphi +chiFillComboBox('select distinct top 10 usr_sqlmj from pdmitem where usr_sqlmj like ''%' + str + '%''',fedtusr_sqlmj); +``` ### 错误提示区