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. c语言数组的赋值问题

    int arr[5]; 当此语句出现再main()之前时,所有的内容被自动赋值为0. 当此语句出现再main()之中时,所有的内容都保持原有内容不变. int arr[5]={0}; 当出现词类语句时 ...

  2. c++ 菜单动态效果

    #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> ...

  3. Install-Package:QRCoder已拥有为System.Drawing.Common定义的依赖项

    error_log PM> Install-Package QRCoder -Version 1.3.3 Install-Package : "QRCoder"已拥有为&qu ...

  4. Redis学习之路(二)之Redis入门基础

    一.Redis基本介绍 (1)Redis介绍 Redis 是一个开源(BSD许可)的,内存中的数据结构存储系统,它可以用作数据库.缓存和消息中间件. 它支持多种类型的数据结构,如 字符串(string ...

  5. Unity3d之Hash&Slash学习笔记(一)--角色属性类的构架

    角色属性类的构架 角色属性类有8个类,继承关系如下图: 每个类的具体作用见之后的随笔

  6. COGS1871 [国家集训队2011]排队(魏铭)

    bzoj:http://www.lydsy.com/JudgeOnline/problem.php?id=2141 cogs:http://cogs.pro:8080/cogs/problem/pro ...

  7. Object C学习笔记10-静态方法和静态属性

    在.NET中我们静态使用的关键字static有着举足轻重的作用,static 方法可以不用实例化类实例就可以直接调用,static 属性也是如此.在Object C中也存在static关键字,今天的学 ...

  8. Qt-网易云音乐界面实现-7 消息中心实现,主要是QListWidget 自定义Item 和QTabwidget使用

    最近写的有点烦躁, 感觉内容真的很多!很多!很多. 目前真的想知道网易官方在出这款产品是,用了多少人和多长时间. 今天写的这个消息中心,有点糙,只是原理实现了没有完全复制过来,心里有团火,不想写了. ...

  9. nGrinder性能测试平台的安装部署

    1.从GitHub下载war包: https://github.com/naver/ngrinder/releases 2.把ngrinder-controller-3.4.2.war重命名为ngri ...

  10. RSA详解

    RSA RSA算法是第一个能同时用于加密和数字签名的算法,也易于理解和操作.RSA是被研究得最广泛的公钥算法,从提出到现今的三十多年里,经历了各种攻击的考验,逐渐为人们接受,普遍认为是目前最优秀的公钥 ...