|
Home > Archive > SQL Anywhere Mobile > July 2005 > Returned value
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]
|
|
|
| Hello There!
mobilink 9.0.2.3044
ultralite 9.0.1
i want to send a value to the mobilink and mobilink run a
.NET script
that checks the existence if this value to return true or
false.
is this possible or should i use QAnywhere??
Thank you in advenced,
Omri Ziv
| |
| Greg Fenton 2005-07-16, 11:23 am |
| Omri wrote:
>
> i want to send a value to the mobilink and mobilink run a
> NET script
> that checks the existence if this value to return true or
> false.
>
One way to do this is to create a separate table. Put the value in one
column, upload, have ML fill in another column with the response
(true/false, or anything else).
You can either put that table into your main publication, in which case
the only time that ML would process the table is if you INSERT or UPDATE
a row. Or you can put the table into its own publication and just
synchronize that publication (to avoid having to wait for all the other
tables to be processed).
Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
| |
|
| G>> One way to do this is to create a separate table. Put
the
G> value in one column, upload, have ML fill in another
G> column with the response (true/false, or anything else).
>
G> You can either put that table into your main publication,
G> in which case the only time that ML would process the
G> table is if you INSERT or UPDATE a row. Or you can put
G> the table into its own publication and just synchronize
G> that publication (to avoid having to wait for all the
G> other tables to be processed).
>
G> Hope this helps,
G> greg.fenton
Hi Greg!
let me see if i got you write:
to upload the values to a spec table and untill i will get
to the download the value true/false will be ready and i'll
download it to a table in the ultelite (ppc);
| |
|
| maybe i was thinking in the wrong direction.
can i have a count(*) sql statment by specific value??
example:
"select count(*) from products where prod_id =?"
(to find out for double prod_id)
how i replace the question mark(sending from the app?)
do i have to insert this value to table or can i use it as
avariable?
| |
| Greg Fenton 2005-07-17, 8:24 pm |
| Omri wrote:
> example:
> "select count(*) from products where prod_id =?"
> (to find out for double prod_id)
> how i replace the question mark(sending from the app?)
> do i have to insert this value to table or can i use it as
> avariable?
I think you have to provide a bigger picture of what you are trying to do.
Where do you want to count(*), at the consolidated or at the remote?
Realize that ML is a very flexible system. You can do just about
anything you want to in synchronization scripts, it is often just a
matter of choosing the right event in which to apply it....and there are
dozens of events to chose from.
BTW: is prod_id the only column of the primary key for the products
table? If so, then count(*) should never equal anything other than 0 or 1.
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
| |
|
| Greg Wrote:
> I think you have to provide a bigger picture of what you
> are trying to do.
>
> Where do you want to count(*), at the consolidated or at
> the remote?
>
> Realize that ML is a very flexible system. You can do
> just about anything you want to in synchronization
> scripts, it is often just a matter of choosing the right
> event in which to apply it....and there are dozens of
> events to chose from.
>
>
lets ask a simple question how can i pass any variable to
the select statment :
select prod_name where prod_id = ?
i need to be able to pass 1 or more variables to download
specific data.
you said that the ML is flexible but i didn't see so far.
please help me to find it's benefits.
have great day,
Omri Ziv
| |
| Greg Fenton 2005-07-18, 9:24 am |
| Omri wrote:
> lets ask a simple question how can i pass any variable to
> the select statment :
>
> select prod_name where prod_id = ?
>
> i need to be able to pass 1 or more variables to download
> specific data.
> you said that the ML is flexible but i didn't see so far.
Well, one way would be to *not* pass variables to the event ;-)
Your scripts can do just about anything they want to. For
download_cursor events, the only requirement for your SQL code is that
it returns a result set. So you can write a SELECT statement or you
could call a stored procedure that first does a whole bunch of stuff and
then returns a result set.
You can put the values you care about into a temporary table (or a
database variable) during one of the earlier events
(begin_synchronizati
on, end_upload, prepare_for_download
, etc...) and
then use that value for the particular event you are looking for.
For example:
SELECT prod_name
FROM products, #my_temp_table
WHERE products.prod_id = #my_temp_table.id
Or you could populate a database variable in an earlier event:
SET @my_id = 123
and use that variable in your select statement:
SELECT prod_name
FROM products
WHERE prod_id = @my_id
Does this help?
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
|
|
|
|
|