|
Home > Archive > SQL Anywhere Mobile > August 2005 > Re: Is it possible to synchronize & insert,delete, update using the mobilink client's authentic
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 |
Re: Is it possible to synchronize & insert,delete, update using the mobilink client's authentic
|
|
| Reg Domaratzki \(iAnywhere Solutions\) 2005-08-31, 1:26 pm |
| Double Argh. The SETUSER command does not affect the return value of
suser_name() in ASE. I was assuming that suser_name() in ASE was the
equivalent of the CURRENT USER constant in ASA, which it is not.
1> select suser_name()
2> go
------------------------------
sa
(1 row affected)
1> setuser 'cons'
2> go
1> select suser_name()
2> go
------------------------------
sa
(1 row affected)
The MobiLink Java API ( or the .NET API ) won't help either, because data
values for upload are not passed into the upload_* JAVA or .NET scripts.
The Java or .NET scripts only return a SQL statement which is then executed
through the ODBC connection.
The only choice left if to handle every row as a conflict, and store the
rows in temporary tables using the upload_old_row_inser
t and
upload_new_row_inser
t events. You will then have an end_upload event for
each table that calls a .NET or Java class. This Java class can make a
connection to the ASE server (using whatever uid/pwd you choose) and process
the data. I'll post a quick sample on the other thread you opened.
--
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/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set filter to "Display ALL platforms IN ALL MONTHS"
"vsv" <nospam@nospam.com> wrote in message news:4315d8d6$1@foru
ms-2-dub...
> The environment is ASE 12.5.1
> < begin_syncronization
>
> setuser ?
> <end event>
> when tried to synchronize I get this error.
>
> E. 08/31 09:03:55. SQLCODE from MobiLink server is: -10002
> E. 08/31 09:03:55. Message: ODBC: [DataDirect][ODBC Sybase Wire Protocol
> driver][SQL Server]The untyped variable ? is allowed only in in a WHERE
> clause or the SET clause of an UPDATE statement or the VALUES list of an
> INSERT statement
> (ODBC State = HY000, Native error code = 7332). Table
> Name: NULL
> I. 08/31 09:03:55. The user authentication value is 0.
>
> when I tried with the following it will not have any impact on
suser_name()
> I don't know if there is a setting in ASE 12.5.1 that will stop this
> function to provide the login id instead of the value that was set.
> The log table do have ppml_user = the value of ml_user after the
completion
> of synchronization.
> thanks in advance.
> vsv
>
>
> < begin_synchronizatio
n>
> declare @user_name_ppml varchar(128)
>
> delete from ppml_debug
> insert into ppml_debug(ppml_user
)
> values (?)
>
> select @user_name_ppml = ppml_user
> from ppml_debug
> setuser @user_name_ppml
> <end event>
>
> "Reg Domaratzki (iAnywhere Solutions)" <FirstName.LastName@ianywhere.com>
> wrote in message news:4315d0c2$1@foru
ms-2-dub...
> any
able[color=darkred]
> http://www.ianywhere.com/developer/product_manuals
news:4315c489$1@foru
ms-1-dub...[color=darkred]
this[color=darkred]
> a
> <FirstName.LastName@ianywhere.com>
> answer
First,[color=darkred
]
> @mlu
unless[color=darkred
]
> MobiLink),
> user
USER[color=darkred]
> client's
the[color=darkred]
our[color=darkred]
> behind
>
>
|
|
|
|
|