ODBC Processes

Post Reply
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

ODBC Processes

Post 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.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
bradohare
Posts: 26
Joined: Wed Jul 23, 2008 3:11 pm

Re: ODBC Processes

Post 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
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: ODBC Processes

Post 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. :D
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: ODBC Processes

Post 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.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: ODBC Processes

Post 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. :D
I don't know whether the query is run twice but of course it does step through the record set twice.
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: ODBC Processes

Post by jim wood »

lotsaram wrote: Of course it does.
What the query runs twice or my revamp helps??? Now who's being cryptic??? :twisted:
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Post Reply