Home > Archive > SQL Anywhere ultralite > March 2006 > Images + ultralite ?









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 Images + ultralite ?
handheldmaster

2006-03-23, 1:25 pm

How-to store images in ultralite database ? How to synchronize these into
the ASA database using mobilink. Does sybsae provide any samples for this ?
Idea is to capture with onboard camera and then store into ultralite db and
sync upto asa server.

Am using appforge 3.5 + ultralite 9.0.2 (mobilevb api) OR can even use
vs.net 2003 cf 1 + ultralite.NET 9.0.2

Several things come to mind; once back on server how-to create image from
binary date. What is best datatype to store, How big can the ultralite
database get with images stored inside it, etc

TIA


handheldmaster

2006-03-23, 8:27 pm

FYI .. Was able to get the image into the ultralite and back upto the ASA.
See

http://www.ianywhere.com/developer/...pplication.html

Question now is how-to extract it from ASA and create the image as a normal
image file on server-side.

Image file is of type BMP.



Greg Fenton

2006-03-23, 8:27 pm

handheldmaster wrote:
>
> Question now is how-to extract it from ASA and create the image as a normal
> image file on server-side.
>


Assume you have a table:

CREATE TABLE pictures(
pic_id UNSIGNED BIGINT DEFAULT GLOBAL AUTOINCREMENT PRIMARY KEY,
pic_binary LONG VARBINARY
);

Then you can write out all binaries from this table to individual files
with:

SELECT xp_write_file('c:/my_pics/' || pic_id || '.bmp', pic_binary)
FROM pictures;

See "xp_write_file" in the online docs for more.

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

2006-03-24, 11:25 am

Thks Greg the xp_write_file worked for me. Now just working out the kinks of
having to manage larger db sizes, purge db and other good stuff on client
side not allowing to shoot too many pictures :o)


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