If you know you are looking for an ODBC error like this you can search the log by using the getlog() function in your script, e.g.:
log=getlog();
for(i=1,i<=nitems(log),i++,
if(contains(log[i],"[Microsoft]")>0,
newwindow("Error",
<<modal,
vlistbox(align("center"),
textbox(log[i]),
buttonbox("OK")))
);
);