Mike,
I select the file out of the db into a variable, write the variable out to a
file and then zip out to another program to view it. You really need to
know what type of file it is. I also have another field where I keep track
of the file type jpg, bmp, doc, pdf...
Try this:
set var vtemp_doc varbit = null
select doc into vtemp_doc from docs_doc where ........
-- assume you want to use ms photo editor to view file:
-- change this to whatever third party viewer you want.
set var vtemp_viewer text = 'c:\program files\common files\microsoft
shared\photoed\photoed.exe'
-- assume pdf file
set var vtemp_file text = 't$$$.pdf'
-- put graphic into file
write .vtemp_doc to &vtemp_file
-- start VIEWER in window and pass graphic in
if (cval('version system')) = 'DOS' then
-- dos
if (envval('os')) = 'windows_nt' then
-- windows NT/2000
zip &vtemp_viewer &vtemp_file
else
-- win 98
zip command /c start .vtemp_viewer &vtemp_file
endif
else
-- windows
zip start .vtemp_viewer &vtemp_file
endif
Troy Sosamon
[EMAIL PROTECTED]
===== Original Message from [EMAIL PROTECTED] at 7/23/02 7:08 pm
>Dear list (and esp Troy),
>
>One of my clients is about to have a nuclear meltdown from paper storage
>issues.
>I have been trying to play around with the "TROY METHOD OF DOCUMENT STORAGE"
>(TMODS from now on.....)but I can't get some really basic stuff to work.
>It's pretty easy to load documents into a table...I made a little table
>called "stuff"
>with just 2 columns, colnumb (an integer) and mystuff (varbit).
>I loaded 3 rows as follows...
>INSERT INTO stuff VALUES (1,['doc1.bmp'])
>INSERT INTO stuff VALUES (2,['doc2.gig'])
>INSERT INTO stuff VALUES (3,['doc3.jpg'])
>
>Doing a LIST stuff confirms I got 3 rows.
>
>The files range from 30k to 200k in size.
>
>NOW HOW DO YOU DISPLAY THE FILES???????? I have tried
>SET V vdoc = mystuff in stuff whe colnumb = 1
>But I can't figure out how to display the file!
>Write .vdoc produces [BMP]
>SHOW VAR vdoc produces [BMP]
>SHOW VAR vdoc=20,20 at 1,1 does nothing.
>
>HELP!
>
>Mike Sinclair
>
>
>
>
>
>================================================
>TO SEE MESSAGE POSTING GUIDELINES:
>Send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: INTRO rbase-l
>================================================
>TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
>In the message body, put just two words: UNSUBSCRIBE rbase-l
>================================================
>TO SEARCH ARCHIVES:
>http://www.mail-archive.com/rbase-l%40sonetmail.com/
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/