|
Home > Archive > SQL Anywhere database replication > February 2006 > MobiLink download cursor - multiple SQL statements
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
MobiLink download cursor - multiple SQL statements
|
|
| Dave Westphal 2006-02-25, 9:41 am |
| I am using version 9.0.2.3228
I am new to using download cursors and MobiLink.
I have a download cursor that has started generating errors because of a
schema (Primary key )change on the source table.
One solution that I see is to have the download cursor execute multiple SQL
statements,
1) create temporary table having old schema
2) pull the data from the changed table into a temp table having the old
schema
3) send data from temp table to Palm
Can multiple SQL statements be added to the download cursor?
call ml_add_table_script(
'Lab',
'ULOrder',
'download_cursor',
'SELECT order_id, cust_id, prod_id, emp_id,
disc, quant, notes, status
FROM ULOrder
WHERE last_modified >= ? AND emp_name = ?' )Thanks in advanceDave
| |
| Reg Domaratzki \(iAnywhere Solutions\) 2006-02-25, 9:41 am |
| Dave, this question should have been posted on the MobiLink newsgroup.
You can make your download_cursor a stored procedure call that returns a
result set, and you can code whatever you like inside your stored procedure.
Having said that, schema changes on the remote or consolidated are usually
associated with a new script version in the consolidated database. You
create a new script version called "lab_v2". Your original "lab" script
version still uses the old schema, and the "lab_v2" script version uses the
new script version. Existing ML Clients using the old schema continue to
use the "lab" script version, but new (or upgraded) ML Client use the new
"lab_v2" script version.
--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup
iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swd/base.do
-> Choose SQL Anywhere Studio
-> Set filter to "Display ALL platforms IN ALL MONTHS"
"Dave Westphal" <Dave_Westphal@aal.org> wrote in message
news:43fc7c6e@forums
-2-dub...
> I am using version 9.0.2.3228
>
> I am new to using download cursors and MobiLink.
>
> I have a download cursor that has started generating errors because of a
> schema (Primary key )change on the source table.
>
> One solution that I see is to have the download cursor execute multiple
SQL
> statements,
> 1) create temporary table having old schema
> 2) pull the data from the changed table into a temp table having the old
> schema
> 3) send data from temp table to Palm
>
> Can multiple SQL statements be added to the download cursor?
> call ml_add_table_script(
> 'Lab',
> 'ULOrder',
> 'download_cursor',
> 'SELECT order_id, cust_id, prod_id, emp_id,
> disc, quant, notes, status
> FROM ULOrder
> WHERE last_modified >= ? AND emp_name = ?' )Thanks in advanceDave
>
>
| |
| Breck Carter 2006-02-25, 9:41 am |
| The download cursor statement needs to produce a single result set.
You can call a stored procedure to do that, and put anything you want
inside the procedure as long as it has a final SELECT that returns the
desired result set to the CALL.
Breck
On 22 Feb 2006 08:05:22 -0800, "Dave Westphal" <Dave_Westphal@aal.org>
wrote:
>I am using version 9.0.2.3228
>
>I am new to using download cursors and MobiLink.
>
>I have a download cursor that has started generating errors because of a
>schema (Primary key )change on the source table.
>
>One solution that I see is to have the download cursor execute multiple SQL
>statements,
>1) create temporary table having old schema
>2) pull the data from the changed table into a temp table having the old
>schema
>3) send data from temp table to Palm
>
>Can multiple SQL statements be added to the download cursor?
>call ml_add_table_script(
> 'Lab',
> 'ULOrder',
> 'download_cursor',
> 'SELECT order_id, cust_id, prod_id, emp_id,
> disc, quant, notes, status
> FROM ULOrder
> WHERE last_modified >= ? AND emp_name = ?' )Thanks in advanceDave
>
--
breck.carter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
|
|
|
|
|