关于DLL与数据库(200分)

  • 主题发起人 主题发起人 wzp31
  • 开始时间 开始时间
W

wzp31

Unregistered / Unconfirmed
GUEST, unregistred user!
我做了个DLL给别人调用,该DLL与数据库是有关系的,当别人一访问我的DLL是,就出错。
我就不知道怎么做了,请指教。
function WtrCash(Com, BeforeCash, CashIn: integer;
CardID, CardAddr,EmployeeCode,
GoodsCode, GoodsDesp: string): Integer;
{0: 表示成功,-1: 余额不足 -2:读写器通讯错
-3: 没有消费系统授权信息! -5: 参数错! -7: 找不到卡!
-11:用户卡错误! -12:读卡错!' -13:写卡错!-15: 不可识别的卡!}
var
Tran : TTransaction;
begin
try
if OpenWRComm(Com, icdev) then
begin
if (BeforeCash - CashIn) < 0 then
begin
Result := -1;
//表示余额不足;
exit;
end;
st :=WRT_Pos_UserCard(icdev, (BeforeCash*100 - CashIn*100), cardserno, 100);
if st = 0 then
begin
Tran := TTransaction.Create;
try
Tran.CardGoodsPos(date,Time,'01',CardID,CardAddr, EmployeeCode, GoodsCode, GoodsDesp,CashIn)//0
finally
Tran.Free;
end;
end
else
Result := st;
end;
finally
CloseComm(icdev);
end;
end;

这个是里面的一个函数。TTransaction,这是个类,是跟数据库打交道的。
有谁有这样的DLL是跟数据库打交道的。能不能跟源码E-MAIL 给我。
E-MAIL: wzp31@sina.com.我这个问题很急!
 
>>WtrCash(Com, BeforeCash, CashIn: integer;
CardID, CardAddr,EmployeeCode,
>> GoodsCode, GoodsDesp: string):
WtrCash(Com, BeforeCash, CashIn: integer;
CardID, CardAddr,EmployeeCode,
GoodsCode, GoodsDespp:Char):
否则调用程序部分需要uses sharemem
 
用到數據庫聯接嗎,如果用到會錯!
 
多人接受答案了。
 
后退
顶部