hello all sorry if title isn't clear enough

let me explain quit tall words :

i'm making program that deal with MS SQL Server 2000 and called it "ProgramA.exe"

so at run time if the connection with Server is lost for any reason(Interned Down - Server Down -....etc) and there are function or sub that will deal with Server it will return error ,i already try to handle most Place that errors may occur,but how know
so i design another application that make check for server every specific time (5 minutes) and called it "SrvChk.exe"

and in program "Program A.exe" there are variable called "Srv_statue" that will hold value of connection "Connected" or "Error returned"

so now question is :

how to make the second application "SrvChk.exe" after check connection to server Pass the value to variable in Program 1 "Program A" that Called "Srv_statue" ??