Function glSignalSetLparameters tcSignal, tcExtraData *- 设置信号灯. *- 当重复设置(名相同)时, 若新旧信号是同一连接@@SPID, 允许重设. 不同连接,失败. *- *- 信号灯 将在 glSignalKill时 或 连接断开时 删除Local cTmp,cSql,nArea,nSPidnArea = Select ()tcSignal = Chrtran(tcSignal, " ,' " , ' ') + '_'+ ; CHRTRAN(goapp._c系统名称, ' '+Chr(39)+Chr(34),'') +'_' +; gcGetMacro(goApp._c数据连接串, ' database',1,';;') glSql(goApp._n连接句柄, ' sp_who @@SPID','_tmpcheckSPid') nSPid = _tmpcheckSPid.spidTEXT to cSql Select top 1 * from ## << tcSignal >> ENDTEXT If glSql(goApp._n连接句柄,cSql, ' _SignalCreation',.F.,'') && exist old signal If nSpid ! = Val ( gcGetMacro(ExTraData, ' CnnHandle') ) &&不是本app设置的signal,不可重设.失败也罢 Select (nArea) Return .F. EndifEndifglSql(goApp._n连接句柄,Textmerge( ' DROP TABLE ##<<tcSignal>>'),'_SignalCreation',.F.,'') *-- TEXT to cSql CREATE TABLE ## << tcSignal >> (ExtraData char ( 1000 ) ) Insert into ## << tcSignal >> (ExtraData ) values ( ' {CnnHandle=<<nSpID>>} {ExtraData=<<Evl(tcExtraData,'')>>}') ENDTEXT If Not glSql(goApp._n连接句柄,cSql, ' _SignalCreation',.F.,'') Return .F.Endif Return .T. *************************************************