function fun_logincheck(var puserinfo:tremployee ;var errormessage:string;flag:string): integer;
varadostoredproctemp:tadostoredproc;
begin
adostoredproctemp := tadostoredproc.create(nil);
trywith adostoredproctemp,adostoredproctemp.parameters,puserinfo do
begin
connection:=datamodulemain.adocon;
//connectionstring:=gconstr;
procedurename:='sp_login';
cmdstoredproc;
refresh;
parambyname('pdm').value :=dm;
parambyname('pmm').value :=fun_crypt(mm);
parambyname('pdlip').value :=dlip;
parambyname('pflag').value :=flag;
execproc;
errormessage:=parambyname('perrmessage').value;
result:=parambyname('perrcode').value;
if (result = 0) and (flag = '0') then
begin
mc:=parambyname('pmc').value;
cdqx:=parambyname('pcdqx').value;
ksqx:=parambyname('pksqx').value;
ksdm:=parambyname('pksdm').value;
ksmc:=parambyname('pksmc').value;
tsqx:=parambyname('ptsqx').value;
glybz:=parambyname('pglybz').value;
cyslf:=parambyname('pcyslf').value;
end;
end;
finally
adostoredproctemp.free;
end;
end;
//說明:1.refresh;一定要,否則得不到引數列表;
2.過程裡除了out型引數,都得給值,否則報錯;
3.如果out引數沒返回值但用了變數去接收,也會報錯;
4.連線用connection比connectionstring快很多;
DELPHI中動態呼叫dll
顯式例子 unit main inte ce uses windows,messages,sysutils,variants,classes,graphics,controls,forms,dialogs,stdctrls,extctrls,grids,dbgrids,db,dbtables,dbc...
delphi動態呼叫dll窗體
宣告 tshowform function ahandle thandle acaption pchar boolean stdcall 呼叫 procedure tform1.n5click sender tobject var mainfrm,dllform thandle showform t...
C呼叫delphi動態庫問題
最近兩天協助成都吉勝的同事做乙個c呼叫delphi動態庫的demo,原以為會很簡單的,畢竟以前還做過delphi呼叫c動態庫的實踐。實踐過程中卻也碰到了不少問題,現記錄下來,供以後參考 開發工具 delphi7.0 vc 6.0 注意點 1 delphi中的匯出函式必須申明為cdecl,而在vc中必...