Page 1 of 1
ODBC Processes
Posted: Thu Jul 28, 2011 1:05 pm
by jim wood
Guys,
I think I have read somewhere that the Process runs the whole query when it opens. I'm not however sure how the process runs on ODBC? Doe sit run it once and use the result through each tab or does it run the query for every tab?
Thanks in advance,
Jim.
Re: ODBC Processes
Posted: Thu Jul 28, 2011 2:28 pm
by bradohare
hi Jim,
When you open the process the query runs once and that's it. To avoid this delay, once we've declared our variables we delete one the items we use to connect to the database (e.g. the username used to connect to the database). Then in the Prolog we set the value we deleted:
DATASOURCEUSERNAME = 'myUserName';
Then when we open it after that, we get an error message saying it cannot connect to the database, but it opens quickly and work fine.
thanks,
brad
Re: ODBC Processes
Posted: Thu Jul 28, 2011 3:37 pm
by jim wood
Guys apologies if my question is a bit cryptic. Basically when you run a process that had a text file for a source and you have code in both meta and data it runs through the file twice. Does it do the same when running an odbc query? I hope that helps.

Re: ODBC Processes
Posted: Thu Jul 28, 2011 3:42 pm
by tomok
I can't tell you for sure because I didn't code TM1 but I would be shocked if the query is run more than once. I have done plenty of programs that query a database and I always run the query once to return a recordset. You can then step through the recordset as many times as you want without having to run the query again. TM1 probably does this too.
Re: ODBC Processes
Posted: Thu Jul 28, 2011 3:43 pm
by lotsaram
jim wood wrote:Guys apologies if my question is a bit cryptic. Basically when you run a process that had a text file for a source and you have code in both meta and data it runs through the file twice. Does it do the same when running an odbc query? I hope that helps.

I don't know whether the query is run twice but of course it does step through the record set twice.
Re: ODBC Processes
Posted: Thu Jul 28, 2011 3:45 pm
by jim wood
lotsaram wrote:
Of course it does.
What the query runs twice or my revamp helps??? Now who's being cryptic???
