Here is a snippet of code I use to extract images from a table. Hope it
helps.
 
SET VAR vpartnum TEXT
 
DECLARE cursor1 CURSOR FOR SELECT part# FROM masterpics ORDER BY part#
OPEN cursor1
FETCH cursor1 INTO vpartnum inv vi1
WHILE SQLCODE <> 100 THEN
  PAUSE 4 USING .vpartnum
  OUTPUT image.dat
  UNLOAD DATA FOR masterpics USING partpic WHERE part# = .vpartnum
  OUTPUT SCREEN
  SET VAR vfile = (.vpartnum + '.jpg')
  RENAME image.lob .vfile
  delete test.dat
  FETCH cursor1 INTO vpartnum inv vi1
ENDWHILE
DROP CURSOR cursor1

  _____  

From: [email protected] [mailto:[email protected]] On Behalf Of R:Daniele
Sent: Tuesday, June 16, 2009 5:21 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Export images from table to file


Hello
there is a way to export images (long varbit) from a table to a file (bmp,
jpg..) ?
I'm using R:BASE 7.6 last update
TIA
Daniele
 
 

Reply via email to