Page 1 of 1

Sending data from a cube view to Access

Posted: Wed Dec 03, 2008 5:38 pm
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

Re: Sending data from a cube view to Access

Posted: Wed Dec 03, 2008 6:30 pm
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.

Re: Sending data from a cube view to Access

Posted: Wed Dec 03, 2008 7:12 pm
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

Re: Sending data from a cube view to Access

Posted: Wed Dec 03, 2008 7:56 pm
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.

Re: Sending data from a cube view to Access

Posted: Wed Dec 03, 2008 10:50 pm
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 :) )

Re: Sending data from a cube view to Access

Posted: Wed Dec 03, 2008 10:54 pm
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....