Delphi中用ADO系列控件获得存储过程的Return值
在Delphi中Ado系列控件使用xxxxx.Parameters.Refresh,可以获得存储过程的Return值
以TADOStoredProc为例
ADOStoredProc1.Connection := 'xxxx';
ADOStoredProc1.ProcedureName := 'XXXX';
ADOStoredProc1.Parameters.Refresh; //刷新存储过程的参数列表
//参数赋值
ADOStoredProc1.ExecProc;
ADOStoredProc1.Parameters[0].Value; //就是Return的返回值
相关文档:
delphi 注册 com 对象的方法
procedure TForm1.Button3Click(Sender: TObject);
var
Sd: TSecurityDescriptor;
begin
InitializeSecurityDescriptor(@Sd, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(@Sd, true, Nil, false);
RegSe ......
---
Delphi in a Unicode World Part I: What is Unicode, Why do you need
it, and How do you work with it in Delphi?
By: Nick
Hodges
原文链接:http://dn.codegear.com/article/38437
Abstract: This article discusses Unicode, how Delphi developers
can benefit from using Unicode, and ho ......
var
arrChar : array [0..4] of Char;
b : Byte;
s : string;
begin
s := 'Test';
Move(Pointer(s)^, arrChar, Length(s)); //string to array of char
ShowMessage(arrChar);
b := Ord(s[1]); //First byte string to one single byte
......
Delphi 创建目录及写日志文件
var
TF: TextFile;
LogFile: string;
txt :string;
sysDir:string;
//创建按钮
procedure TForm1.Button1Click(Sender: TObject);
begin
sysDir:=extractfilepath(application.ExeName );
if not directoryexists(sysdir+'log\') then
createdir(sysdir+'log ......