Page 1 of 1

does ODBCOutPut( ) wait for sql to finish

Posted: Thu May 25, 2017 1:29 am
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

Re: does ODBCOutPut( ) wait for sql to finish

Posted: Thu May 25, 2017 5:08 pm
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.