|
Home > Archive > SQL Anywhere Mobile > November 2005 > user_id of user mobilink
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 |
user_id of user mobilink
|
|
|
| Hi all,
mobilink 9.0.1.1751
ultralite 9.0.1.1751
i programed a c# dll that connected to download_cursor
event.
this DLL is composing a sql statment.
it works perfectly when i generate it simpley and returning
a string with the satament. but i need to know the mobilink
user (user_id) so ican download specific rows for it. how
can i do it??
what to wite in the sybase centeral and how to change the
method signiture.
Thank you in Advenced
Omri Ziv
| |
| David Fishburn 2005-11-15, 9:24 am |
| Omri wrote in news:4379ef6f.28a6.1681692777@sybase.com
of sybase.public.sqlanywhere.mobilink:
O> Hi all,
O> mobilink 9.0.1.1751
O> ultralite 9.0.1.1751
O>
O> i programed a c# dll that connected to download_cursor
O> event.
O> this DLL is composing a sql statment.
O> it works perfectly when i generate it simpley and returning
O> a string with the satament. but i need to know the mobilink
O> user (user_id) so ican download specific rows for it. how
O> can i do it??
O> what to wite in the sybase centeral and how to change the
O> method signiture.
The .Net tutorial (902 at least) shows you how to do just that:
MobiLink Tutorials
Tutorial: .NET Synchronization Logic With Adaptive Server Anywhere
Lesson 1: Compile the CustdbScripts.dll assembly with MobiLink
references
The CustdbScripts assembly
....
namespace MLExample
{
class CustdbScripts
{
public static string UploadInsert()
{
return("INSERT INTO ULCustomer(cust_id,c
ust_name) values (?,?)");
}
public static string DownloadCursor(Syste
m.DateTime ts, string user )
{
return("SELECT cust_id, cust_name FROM ULCustomer WHERE last_modified
>= '" + ts.ToString("yyyy-MM-dd hh:mm:ss.fff") +"'");
}
}
}
Notice the DownloadCursor is passed in 2 parameters. You can just
append a
"AND your_col_name = '" + user + "'"
--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).
EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm
Developer Community / Whitepapers
http://www.ianywhere.com/developer
CaseXpress - to report bugs
http://casexpress.sybase.com
CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]
| |
|
| Hi David,
first of all THANK YOU!!
second i found the solution, my DLL was for the evevnt
download_cursor and the signiture of theDLL was
MyMethod(string x) but the signiture need to be MyMethod(
Datetime t ,string x)
you answerd to someone at 2003 and ifound it somehow.
thanks anyway
have a great day,
Omri Ziv
|
|
|
|
|