does ODBCOutPut( ) wait for sql to finish

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

does ODBCOutPut( ) wait for sql to finish

Post by yyi »

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
Yeon
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 »

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