= (SQLSETPROP(0,'DispWarnings',.F.) && No error dialog >>
>>define class myclass as custom OLEPUBLIC >> >>FUNCTION INIT >> >> >> SET RESOURCE OFF >>*--and all other "sets" here >>SET REPROCESS TO 2 SECONDS >>SYS(2335,0) >>SQLSetProp(0,"DispLogin",3) >> >>ENDFUNC >> >> >>Function MakeData >> Parameters tcmake >> Local lcmake >> && CD\Your_Dir >> If PCOUNT( ) >0 >> lcmake = tcmake >> lcmake = Alltrim(lcmake) >> Else >> lcmake ='' >> Endif >> Set Safety Off >> Close Data >> Clear >> >> lcConStr = "DRIVER=SQL Server;SERVER=(local);TrustedConnection=Yes " >> >> lhX = Sqlstringconnect( lcConStr ) >> str1=" SELECT * from YOUR_TABLE" >> lnRet = SQLEXEC( lhX, str1,'lcret' ) && BUG HERE GUI presence >> >> Close Databases >> Close Data >>ENDFUNC >>ENDDEFINE >>>