谁能帮我利用SocketConnection实现回调函数。(100分)

  • 主题发起人 主题发起人 yzykjh
  • 开始时间 开始时间
在服务器端使用类编辑器新建一个Method,如ProcPrepare参数为:ProcID Short [in],在远程数据模块中写上代码不就可以了吗:
procedure TFax.ProcPrepared(ProcID: Smallint);
begin
if IBTransaction1.InTransaction then
try
IBTransaction1.Commit;
except
IBTransaction1.Rollback;
end;
IBTransaction1.StartTransaction;
case Procid of
1: Change_Tax_sp.Prepare;
2: AddUser_sp.Prepare;
3: DelUser_sp.Prepare;
//4: CountQc_sp.Prepare;
5: PrintCunSj_sp.Prepare;
6: ViewQC_sp.Prepare;
7: inputTax_sp.Prepare;
8: Tot_Man_Fax_sp.Prepare;
9: DelManFax_sp.Prepare;
10: sp_TDBD_ZEN.Prepare;
11: sp_TDBD_Jian.Prepare;
12: sp_Update_Ts.Prepare;
13: PiaoJu_sp.Prepare;
14: Find_FP_No_sp.Prepare;
15: sp_Add_Jcb2_Shi.Prepare;
16: sp_Add_Jcb3_XianShi.Prepare;
17: sp_Add_Jcb4Xiang.Prepare;
18: sp_Add_Jcb5_Cun.Prepare;
19: sp_Add_Jcb6_JuWei.Prepare;
20: sp_Del_Jcb2Shi.Prepare;
21: sp_Del_Jcb3XianShi.Prepare;
22: sp_Del_Jcb4Xiang.Prepare;
23: sp_Del_Jcb5Cun.Prepare;
24: sp_Del_jcb6JuWei.Prepare;
25: sp_Add_Jcb7Hand.Prepare;
26: sp_Update_Jcb7Hand.Prepare;
27: sp_Del_Jcb7_Hand.Prepare;
28: fp_MaxNO_sp.Prepare;
29: ChangePassword_sp.Prepare;
30: Add_Log_sp.Prepare;
31: EmplyTable_sp.Prepare;
32: ServerInfo_sp.Prepare;
33: RegUser_sp.Prepare;
34: GetProgress_sp.Prepare;
35: SmallQcView_sp.Prepare;
36: Add_Ss_Info_proc.Prepare;
37: Del_Ss_Info_Proc.Prepare;
38: Check_Ss_Info_Proc.Prepare;
39: CanSsByThisMan_sp.Prepare;
40: proc_DelAllHzb.Prepare;
41: proc_PrepareJMZHZB.Prepare;
42: proc_PrepareXZBHZB.Prepare;
43: proc_PrepareXZCHZB.Prepare;
44: spAddPatchPj.Prepare;
45: sp_ReturnQcPrintInfo.Prepare;
46: spReturnJCB1.Prepare;
47: spReturnMRSF.Prepare;
48: quRjz.Prepare;
49: spChangeQhName.Prepare;
50: spTaxWq_Input.Prepare;
51: spTot_Tax_Count.Prepare;
52: spEditJcb7.Prepare;
53: spTsNew.Prepare;
end;
end;
 
关键是注册GIT,使方法在线程里可用就可以了
但回调有个关键问题无法解决,使我们最终放弃这种方法,建议你直接使用socket解决传输问题! 嘿嘿,出了问题别怪我没提醒过你
 
多人接受答案了。
 
后退
顶部