procedure TCustomerForm.FindCustomerInfo;
var
  strSql:string;
begin

//  BL_HV_FindCustomerInfo 存储过程的名称,后面是需要的全部的参数
  strSql:='exec BL_HV_FindCustomerInfo :StyleInt,:CustomerName,:RelationName,'
         +':RelationPhone,:Address,:CustomerStatus,:ErrorCode output,:ErrorMessage output';

with adoQryCustomer do
  begin
    Close;
    SQL.Clear;
    SQL.Add(strSql);
    if rbOr.Checked = True then
      Parameters.ParamByName('StyleInt').Value := '0'
    else
      Parameters.ParamByName('StyleInt').Value := '1';
    Parameters.ParamByName('CustomerName').Value := Trim(edtFindCustomerName.Text);
    Parameters.ParamByName('RelationName').Value := Trim(edtFindRelationName.Text);
    Parameters.ParamByName('RelationPhone').Value := Trim(edtFindRelationPhone.Text);
    Parameters.ParamByName('Address').Value := Trim(edtFindAddress.Text);
    if cbFindCustomerStatus.Checked then
    Parameters.ParamByName('CustomerStatus').Value :=1
    else
    Parameters.ParamByName('CustomerStatus').Value :=0;
    ExecSQL;
    ErrorCodeStr := Parameters.ParamByName('ErrorCode').Value;

if ErrorCodeStr <> '0' then
      ShowMessage(Parameters.ParamByName('ErrorMessage').Value)
    else
      Active := True;
  end;
  if dbgrdhCustomer.CanFocus then
    dbgrdhCustomer.SetFocus;
end;

转自:https://blog.csdn.net/xiongmao000738/article/details/6956094

Delphi 使用TAdoQuery执行存储过程的样例的更多相关文章

  1. 在Ubuntu下构建Bullet以及执行Bullet的样例程序

    在Ubuntu下构建Bullet以及执行Bullet的样例程序 1.找到Bullet的下载页,地址是:https://code.google.com/p/bullet/downloads/list 2 ...

  2. Thrift源代码分析(八)--总结加一个完整的可执行的Thrift样例

    前面七篇文章分析了Thrfit的方方面面,看到这里时应该对Thrift有了深入的理解. Thrift源代码分析(一)-- 基本概念 Thrift源代码分析(二)-- 协议和编解码 Thrift源代码分 ...

  3. mysql 存储过程 演示样例代码

    drop procedure if exists P_SEQUENCE; /** 暂省略包 @AUTO LIANGRUI 2014/6/27 T_PRO_PRODUCT 表 排序 对整个表进行按序号排 ...

  4. 图解VC++ opengl环境配置和几个入门样例

    VC6下载 http://blog.csdn.net/bcbobo21cn/article/details/44200205 demoproject和glut库下载 http://pan.baidu. ...

  5. kqueue演示样例

    网络server通常都使用epoll进行异步IO处理,而开发人员通常使用mac,为了方便开发.我把自己的handy库移植到了mac平台上. 移植过程中,网上竟然没有搜到kqueue的使用样例.让我吃惊 ...

  6. Java 8 时间日期库的20个使用演示样例

    除了lambda表达式,stream以及几个小的改进之外,Java 8还引入了一套全新的时间日期API,在本篇教程中我们将通过几个简单的任务演示样例来学习怎样使用Java 8的这套API.Java对日 ...

  7. 展示C代码覆盖率的gcovr工具简单介绍及相关命令使用演示样例

    (本人正在參加2015博客之星评选,诚邀你来投票,谢谢:username=zhouzxi">http://vote.blog.csdn.net/blogstar2015/candida ...

  8. 【COCOS2D-HTML5 开发之三】演示样例项目附源代码及执行的GIF效果图

    本站文章均为李华明Himi原创,转载务必在明显处注明:(作者新浪微博:@李华明Himi) 转载自[黑米GameDev街区] 原文链接: http://www.himigame.com/cocos2d- ...

  9. Eureka 的 Application Client client的执行演示样例

            上篇以一个 demo 演示样例介绍了 Eureka 的 Application Service 客户端角色.今天我们继续了解 Eureka 的 Application Client 客 ...

随机推荐

  1. JavaEE笔记(八)

    第一个Spring Student(学生) bean package com.my.bean; import java.io.Serializable; public class Student im ...

  2. Design3:数据层次结构建模之二

    SQL Server提供了一个新的数据类型 HierarchyID,用来处理层次结构的数据,这个数据类型是系统内置的CLR数据类型,不需要专门激活 SQL/CLR 功能即可使用.当需要表示各值之间的嵌 ...

  3. asp.net core 自定义中间件和service

    首先新建项目看下main方法: public static void Main(string[] args) { var host = new WebHostBuilder() .UseKestrel ...

  4. 增强学习训练AI玩游戏

    1.游戏简介 符号A为 AI Agent. 符号@为金币,AI Agent需要尽可能的接取. 符号* 为炸弹,AI Agent需要尽可能的躲避. 游戏下方一组数字含义如下: Bomb hit: 代表目 ...

  5. CentOS7的安装与配置

    Linux系统以前接触的不多,主要是公司的网站部署在了一台安装了Ubuntu系统的机器上.是典型的LAMP架构的产物,因为偶而需要更新网站内容及需要定期备份.所以学习了一些Ubuntu & A ...

  6. 文本编辑器 vi/vim 的使用

    文本编辑器 vi/vim 一.启动与退出 1. vim 2. vim 文件名(可以是存在的文件,也可以是不在的文件) 3.退出 :q   或者:x 在非“插入”模式二.vi/vim的工作模式 1.正常 ...

  7. 如何解决zabbix snmp异常超时、不稳定、时通时断:Timeout

    针对平时工作中,zabbix snmp出现异常超时.不稳定.时通时断:Timeout while connecting 等的情况,以下我将以使用乐维监控为例,进行解决方案的详细叙述.   一.问题:设 ...

  8. 机器学习基础 --- pandas的基本使用

    一.pandas的简介 Python Data Analysis Library 或 pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而创建的.Pandas 纳入了大量库和一些 ...

  9. js多条件if语句简写发生Uncaught SyntaxError: Unexpected token }

    改写原生js 多条件if判断语句时,采用三元方法,发生Uncaught SyntaxError: Unexpected token } function compareImgSize() { var ...

  10. Python爬虫框架Scrapy学习笔记原创

     字号 scrapy [TOC] 开始 scrapy安装 首先手动安装windows版本的Twisted https://www.lfd.uci.edu/~gohlke/pythonlibs/#twi ...