does ODBCOutPut( ) wait for sql to finish

Post Reply
User avatar
yyi
Community Contributor
Posts: 117
Joined: Thu Aug 28, 2008 4:42 am
Location: Sydney, Australia

does ODBCOutPut( ) wait for sql to finish

Post by yyi » Thu May 25, 2017 1:29 am

It might be an obvious thing but I'm not sure right now, if odbc function is run in prolog and not the data source tab - and say the sql takes 3 minutes to run; does it wait before going onto the next statement in prolog or just keep going?

Code: Select all

pProcess = GetProcessName( );

dsnSQL =  'TM1_Finance';
ODBCOpen(dsnSQL, 'tm1admin', 'password');
vSQL = 'Exec usp_joinSomeTables';

ODBCOutPut(dsnSQL, vSQL);
ODBCClose(dsnSQL);

...

run some more prolog functions dependent on prev query result
win2012 svr: tm1 v10.2.2 x64, client v10.2.2 x64/PA 2.0, win10, excel 365.

BrianL
MVP
Posts: 264
Joined: Mon Nov 03, 2014 8:23 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2 PA2
Excel Version: 2016

Re: does ODBCOutPut( ) wait for sql to finish

Post by BrianL » Thu May 25, 2017 5:08 pm

AFAIK the only thing asynchronous in TI is ExecuteCommand when using zero for the Wait parameter.

You can easily test this out. Use the LogOutput function to write to the message log before and after the OdbcOutput call. You'll see timestamps next to the log messages.

Post Reply