Home > Archive > SQL Anywhere Mobile > April 2006 > Howto: Specify a where clause based on ml_user in a publication









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 Howto: Specify a where clause based on ml_user in a publication
Ignacio Mateos

2006-04-07, 11:31 am

Hi:

I need to specify a WHERE for a table in my remote included in the
publication.

I want to do something like

WHERE user_name = ml_user_name

I don't know how to do this, in the diferent events I can use ? to specify
ml_user_name but,

how do I do this for a where in a publication?

Regars



Breck Carter [Team iAnywhere]

2006-04-07, 1:31 pm

Why do you want to do this? Do you have more than one synchronization
user set up? Do you want to *prevent* changes from being uploaded?

To answer your question, if you only have one synchronization user on
the remote database, this query will probably give you the user name:

SELECT FIRST site_name
FROM SYSSYNC
WHERE site_name IS NOT NULL
ORDER BY last_upload_time DESC;

But why not just hard code it?

If you have two or more synchronization users on the one remote, I'm
not sure *what* you can do.

But I really think you don't want to do this.

Breck


On 7 Apr 2006 10:00:20 -0800, "Ignacio Mateos"
<imateos@telefonica.net> wrote:

>Hi:
>
>I need to specify a WHERE for a table in my remote included in the
>publication.
>
>I want to do something like
>
>WHERE user_name = ml_user_name
>
>I don't know how to do this, in the diferent events I can use ? to specify
>ml_user_name but,
>
>how do I do this for a where in a publication?
>
>Regars
>
>


--
Breck Carter [Team iAnywhere]
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
The book: http://www.risingroad.com/ SQL_Anyw...pers_Guide.html
breck.carter@risingroad.com
Greg Fenton

2006-04-07, 1:31 pm

Ignacio Mateos wrote:
> I want to do something like
>
> WHERE user_name = ml_user_name
>


Hmmm...I would first wonder why you think you need to do this only
because I have never run into a similar need myself.

One problem with your request is that ML is designed in such a way that
a publication can be subscribed to by more than one synchronization user
(a.k.a. "ml_user_name"). So for a publication there is no concept of a
single "ml_user_name" to use in the WHERE clause.

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com