On Fri, 2004-06-25 at 22:00, Anima wrote: > [EMAIL PROTECTED] wrote: > > >On Fri, 2004-06-25 at 20:30, Anima wrote: > > > > > > > >>I am using Syabse::DBD 1.02. Currently we are storing images and text > >>files in a Sybase TEXT column after converting to Hexadecimal. The data > >>is doubled in storage size due to the conversion. We are having db space > >>issues due to that. > >> > >> > > > >IMAGE and TEXT use the same underlying storage mechanism. The difference > >is that IMAGE is a binary storage - no character set conversion of any > >sort happens during either inserts or fetches. > > > => Mike, a question. So if I stored an image 2MB file in IMAGE datatype > in sybase (which from what you said will be stored as binary) what would > be the storage bytes used? Since currently when I save in TEXT datatype, > I *have* to store it in HEX to get it working and that storage is 4MB in > the database for a 2MB image file. I am trying to see if getting the > images stored in IMAGE datatype would give me any storage advantage > compared to from what we are currently doing
It would use 2MB rounded up to the nearest multiple of the page size of the server. > >I would definitely store images on IMAGE columns - and you should be > >able to use DBD::Sybase 1.02 (or later - 1.04 is the current version) to > >do this. > > > ==> I have not been successfully able to acheive this yet using > DBD::Sybase 1.02, hence the above question. What does your code look like? Take a look at t/xblob.t in the DBD::Sybase distribution for an example of using the ct_send_data() and friends BLOB write API. Michael -- Michael Peppler Data Migrations, Inc. [EMAIL PROTECTED] http://www.peppler.org/ Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or long term contract positions - http://www.peppler.org/resume.html
