Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Client uploading photo file to database through web services

3 posts in General Discussion Last posting was on 2008-09-24 15:38:38.0Z
Liza A.S Posted on 2008-09-22 05:54:57.0Z
Sender: 571.48d731e6.1804289383@sybase.com
From: Liza A.S
Newsgroups: ianywhere.public.general
Subject: Client uploading photo file to database through web services
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48d73331.594.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 21 Sep 2008 22:54:57 -0700
X-Trace: forums-1-dub 1222062897 10.22.241.41 (21 Sep 2008 22:54:57 -0700)
X-Original-Trace: 21 Sep 2008 22:54:57 -0700, 10.22.241.41
Lines: 12
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7094
Article PK: 5315

Hi all,

I am new to web services technology. I've done some small
services for client to get data and put data inside the
database. Now, my client wants to upload small photo file
(3-4KB) using web services. Can anybody help? Any help is
very
much appreciated.

TIA

-Liza A.S


David Fishburn Posted on 2008-09-24 14:56:45.0Z
Newsgroups: ianywhere.public.general
Subject: Re: Client uploading photo file to database through web services
From: David Fishburn <fishburn_spam_off@ianywhere.com>
References: <48d73331.594.1681692777@sybase.com>
Organization: iAnywhere Solutions
Message-ID: <Xns9B236F58B4E3Dfishburnsybasecom@192.138.151.106>
User-Agent: Xnews/2005.10.18
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 24 Sep 2008 07:56:45 -0700
X-Trace: forums-1-dub 1222268205 10.22.241.152 (24 Sep 2008 07:56:45 -0700)
X-Original-Trace: 24 Sep 2008 07:56:45 -0700, vip152.sybase.com
Lines: 41
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7095
Article PK: 5317

Liza A.S wrote in news:48d73331.594.1681692777@sybase.com
of ianywhere.public.general:

LAS> I am new to web services technology. I've done some small
LAS> services for client to get data and put data inside the
LAS> database. Now, my client wants to upload small photo file
LAS> (3-4KB) using web services. Can anybody help? Any help is
LAS> very
LAS> much appreciated.

This really should be nearly identical to doing the usual operations.

You will be passing the BLOB to the routine the same way you would
pass a varchar(10). But the procedure you call in the database will
be defined as a LONG BINARY or BINARY(???). Then just do an INSERT as
usual.

The code to browse to the image to upload (in the browser) is
unrelated to the web service call and is all client side.

--
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 (dbeng10 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

Developer Community / Whitepapers
http://www.ianywhere.com/developer

Case-Express - to report bugs
http://case-express.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList


Jeff Albion (Sybase iAnywhere) Posted on 2008-09-24 15:38:38.0Z
From: "Jeff Albion (Sybase iAnywhere)" <firstname.lastname@ianywhere.com>
User-Agent: Thunderbird 2.0.0.16 (Windows/20080708)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Client uploading photo file to database through web services
References: <48d73331.594.1681692777@sybase.com> <Xns9B236F58B4E3Dfishburnsybasecom@192.138.151.106>
In-Reply-To: <Xns9B236F58B4E3Dfishburnsybasecom@192.138.151.106>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48da5efe$1@forums-1-dub>
Date: 24 Sep 2008 08:38:38 -0700
X-Trace: forums-1-dub 1222270718 10.22.241.152 (24 Sep 2008 08:38:38 -0700)
X-Original-Trace: 24 Sep 2008 08:38:38 -0700, vip152.sybase.com
Lines: 32
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7097
Article PK: 5320

Liza,

Also, be sure to check out: "<samples>\SQLAnywhere\HTTP\gallery.sql" for
an HTTP example on a simple image gallery (which has "Upload file"
capabilities).

(Where "<samples>" is either %ASANY9%\Samples, %SQLANYSAMP10%, or
%SQLANYSAMP11%)

Cheers,

David Fishburn wrote:
> This really should be nearly identical to doing the usual operations.
>
> You will be passing the BLOB to the routine the same way you would
> pass a varchar(10). But the procedure you call in the database will
> be defined as a LONG BINARY or BINARY(???). Then just do an INSERT as
> usual.
>
> The code to browse to the image to upload (in the browser) is
> unrelated to the web service call and is all client side.
>

--
Jeff Albion, Engineering
Sybase iAnywhere

iAnywhere Developer Community :
http://www.sybase.com/developer/library/sql-anywhere-techcorner
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
SQL Anywhere Patches and EBFs :
http://downloads.sybase.com/swd/summary.do?baseprod=144&client=ianywhere&timeframe=0