I have maked a solution
>
public nconn
nconn = SQLSTRINGCONNECT([DRIVER=SQL Server;SERVER=MySqlServer;UID=sa;PWD=sa;APP=Microsoft Visual FoxPro;WSID=MYPCNAME;DATABASE=master])])
FUNCTION CustomSqlExec
LPARAMETERS CSTMT, cAlias, aCount
LOCAL nResult
nresult = SQLEXEC(nconn,CSTMT, cAlias, aCount)
IF nResult > 0
RETU nResult
ELSE
*!* in this case I woud want to inser code for testing if Connection to server was lost and then
*!* 1 ) retry the connection
*!* 2 ) Re-Execute the query
Aerror(asqlerr)
For x = 1 To Alen(asqlerr,2)
If nvl(asqlerr[x,4],"") = "08S01"
*!* Lost connection for NETWORKS Problem
cConnStr = SQLGetprop(nconn,"ConnectString")
SQLDisconnect(nconn)
nconn= Sqlstringconnect(cConnStr)
IF nconn > 0
nresult = SQLEXEC(nconn,CSTMT, cAlias, aCount)
ENDIF
EXIT
ENDFOR
RETU nResult
ENDIF
Thanks the same