Home > Archive > SQL Anywhere ultralite > March 2006 > determine upload or download only in Java









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 determine upload or download only in Java
Brent Williams

2006-03-22, 8:26 pm

I'm running v9.0.2.3249

What is the best way to determine if upload only or download only was
specified from the client? I want to conditionally do something based
on those flags.

Thanks
David Fishburn

2006-03-23, 1:25 pm

Brent Williams < brentwilliams@bcbsal
.org> wrote in news:4421a484@forums
-2-
dub
of sybase.public.sqlanywhere.ultralite:

BW> I'm running v9.0.2.3249
BW>
BW> What is the best way to determine if upload only or download only was
BW> specified from the client? I want to conditionally do something based
BW> on those flags.

You mean in the ML server?

I will check into this. For interest sake, can you give me an example.

--
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]

Brent Williams

2006-03-28, 11:24 am

Yes in the ML server. FYI, I have since opened a case with your support
team. They say there is no way to determine if the client specified
upload or download only as part of the sync. One suggestion was to have
different script versions for the upload only and download only and
handle the logic in different scripts. That will work but is not my
ideal solution.

If you look back at my post about "passing error messages" you will see
what we are doing. When sending a prescription to a pharmacy I need to
call a external application but don't want to call that app when not
sending to the pharmacy. It is a little more involved then that but
that is a short version.

David Fishburn wrote:
> Brent Williams < brentwilliams@bcbsal
.org> wrote in news:4421a484@forums
-2-
> dub
> of sybase.public.sqlanywhere.ultralite:
>
> BW> I'm running v9.0.2.3249
> BW>
> BW> What is the best way to determine if upload only or download only was
> BW> specified from the client? I want to conditionally do something based
> BW> on those flags.
>
> You mean in the ML server?
>
> I will check into this. For interest sake, can you give me an example.
>

Greg Fenton

2006-03-28, 11:24 am

Brent Williams wrote:
> Yes in the ML server. FYI, I have since opened a case with your support
> team. They say there is no way to determine if the client specified
> upload or download only as part of the sync.


The (somewhat funny) thing is that they got their answer on a posting to
an internal newsgroup...to which David had responded with the same
response he gave above.

However, there is one idea that David and I discussed yesterday afternoon:

Set an authentication_param
eter indicating the type of sync your
application is doing.

Then write an authenticate_user script to fetch that parameter and
store it somehow (database variable, temp table, etc...) for use in
other synch scripts.


> When sending a prescription to a pharmacy I need to
> call a external application but don't want to call that app when not
> sending to the pharmacy. It is a little more involved then that but
> that is a short version.


I don't completely see that ML needs to know about "upload only" vs.
"download only".

Is there no way to look at the data in the consolidated at the end of an
upload and only call the external app if "new" data has arrived?
Essentially, I would have a column on my new data called
"is_processessed" (or something) that defaults to FALSE. After calling
the external app, convert all those flags to TRUE. But without knowing
more about the schema and the external app, it is hard to provide more
guidance.


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