Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1223287
  • 博文数量: 788
  • 博客积分: 4000
  • 博客等级: 上校
  • 技术积分: 7005
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-19 15:52
文章存档

2017年(81)

2011年(1)

2009年(369)

2008年(337)

分类:

2009-06-10 14:03:07

请问DELPHI   TADOQUERY   如何获得参数替换后的最终SQL语句?  
  如:  
          ADOQ_Update_pd_d2.SQL.Clear;  
          ADOQ_Update_pd_d2.SQL.Add('update   pd_d2   set   zhsm=:zhsm,ptsm=:ptsm,hq=:hq,pdhhptxx=:pdhhptxx');      
          ADOQ_Update_pd_d2.SQL.Add('where   pdbh=:pdbh   and   pdhh=:pdhh   and   hh=:hh   and   ptxx=:ptxx   and   hhxx=:hhxx');  
   
  。。。。。  
              ADOQ_Update_pd_d2.Parameters.ParamByName('pdbh').Value:=pdbh;  
              ADOQ_Update_pd_d2.Parameters.ParamByName('pdhh').Value:=pdhh;  
              ADOQ_Update_pd_d2.Parameters.ParamByName('hh').Value:=hh;  
              ADOQ_Update_pd_d2.Parameters.ParamByName('ptxx').Value:=ptxx;  
   
  用ADOQ_Update_pd_d2.sql.text取得还是带参数的。  
   
   
 



--------------------------
新闻:一款软件何以管理一个复杂的社会
网站导航: 博客园首页  新闻  .NET频道  社区  博问  闪存  找找看
阅读(1933) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~