Sending data from a cube view to Access

Post Reply
cw1194
Posts: 10
Joined: Fri Sep 12, 2008 4:19 pm

Sending data from a cube view to Access

Post by cw1194 »

I could really use some help if someone has an idea. I need to get a value to access from my cube view and am getting an SQL error.

In my prolog tab I have the following:
Source='sendodbc';


ODBCOpen('sendodbc',' ',' ');
(sendodbc is the name of the odbc I set up to connect to my table called sendodbc in access)

ODBCOutPut( 'sendodbc', expand('INSERT INTO sendodbc [Store] VALUES ( Store)' ));
(again sendodbc is both the name of my driver and the access table I am trying to push information to)
(there are actually 6 fields in the view but I set the other fields to ignore in the variables tab)

ODBCClose('sendodbc');


this is a rehashing of a post I put out about 7 weeks ago...I was never able to get it to function properly.
Thanks
David Usherwood
Site Admin
Posts: 1453
Joined: Wed May 28, 2008 9:09 am

Re: Sending data from a cube view to Access

Post by David Usherwood »

Do an asciioutput to file of the exact string you are sending to Access via ODBC and see if it is valid SQL. Expand is not a nice command and TI doesn't have debugging tools. The SQL is probably invalid - quotes etc.
cw1194
Posts: 10
Joined: Fri Sep 12, 2008 4:19 pm

Re: Sending data from a cube view to Access

Post by cw1194 »

When I input the following asciioutput statement:

asciioutput('c:\temp1.txt', ('INSERT INTO sendodbc (Store) VALUES ( Store)' ));

it returned the following into my temp1.txt file:

"INSERT INTO sendodbc (Store) VALUES ( Store)"

I am assuming I want to see actual values and not literals correct? Do you know why this is happening?

Thanks
cw1194
Posts: 10
Joined: Fri Sep 12, 2008 4:19 pm

Re: Sending data from a cube view to Access

Post by cw1194 »

Okay I changed the ASCIIOUTPUT command to:
asciioutput('c:\temp1.txt', store);

and it actually returned the first value in my cube view. So I guess I just need to sort out my SQL statement....which has proven a difficult task.
David Usherwood
Site Admin
Posts: 1453
Joined: Wed May 28, 2008 9:09 am

Re: Sending data from a cube view to Access

Post by David Usherwood »

Not sure if this is the approved way to post a link to another post, but you should look at

http://forums.olapforums.com/viewtopic. ... tput#p2228

It even talks about Access - you're in luck! (Except that I would say you would be more in luck if you could use SQL Server :) )
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Sending data from a cube view to Access

Post by Alan Kirk »

David Usherwood wrote:Not sure if this is the approved way to post a link to another post, but you should look at
http://forums.olapforums.com/viewtopic. ... tput#p2228
Around these parts, the "approved way" is usually "whatever works". :D
David Usherwood wrote: It even talks about Access - you're in luck! (Except that I would say you would be more in luck if you could use SQL Server :) )
Hmmmm.... I thought that there was something oddly familiar about this thread....
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Post Reply