CON=SQLStringConnect("Driver=sql server;Server=10.3.xxx.xxx;DataBase=xxxx;UID=xxxx;PWD=xxxxxx") IF con<0 =messagebox('没法联接到服务器.') THIS.Enabled =.T. RETURN ENDIF