Saturday, February 25, 2012

RDA pull - from a temporary table

Hi

I am doing a RDA Pull with tracking off, getting the data via a stored procedure.

Ideally I want the proc to return the data from a temporary table, so I can do some fancy formatting of the data before we pull it down to the PDA. It's not updateable, so with tracking off, I would have thought this would be possible - but sadly it doesn't work. No error messages, but the table doesn't get created.

I'm using SQL 2005 June CTP if that helps.

Any ideas ?

thanks
Bruce

Here are the details we want:
1) Where is this Store Proc executed and how?

Note: SQL Mobile does not support stored procs in its Database. However you can use RDA.SubmitSql to execute a stored proc, available in SQL Server DB, on SQL Server remotely from SQL Mobile device.

2) SQL Statement in "RDA.Pull" command can only be some thing like
"SELECT col1, col2, col3 from testTable where col4 = 'TEST'".

It CANNOT be some thing like
"Execute sp_createformattedtemptable testTable".

If you want to acheive the functionality you are mentionig, you can do this way:
Before you do RDA Pull, do a RDA Submit SQL and execute store proc. This store proc should create a table with the expected data in expected format. Then use RDA Pull to pull the table down to SQL Mobile device. And, then do RDA Submit SQL to delete the just created temp table.

Hope this helps!

Thanks,
Laxmi NRO, MSFT, SQL Mobile

No comments:

Post a Comment