EXAMPLE 1


dim cn as sql::Connection

cn.open("::name::conn")

vsql = "SELECT * FROM mytable"

if cn.execute(vsql) = .f.

save_to_file("MY_REFERENCE|" + cn.callresult.text,"c:\mylog.txt")

goto someplace_in_script

end if

cn.close()

END        

someplace_in_script:


EXAMPLE 2 - using custom error report function


dim cn as sql::Connection

cn.open("::name::conn")

vsql = "SELECT * FROM abc"

if cn.execute(vsql) = .f.

errorout("MY_REFERENCE|" + cn.callresult.text)

goto someplace_in_script

end if

cn.close()

END        

someplace_in_script: