Oma, I didn't see that it was 8.0, but I just tested the write command in 8.0 
and it is the same as 7.6, which is expected as the command parser would be the 
same.

These are valid:

{literal filename}
WRITE .vSomeDoc to SomeFileName.EXT

{as a VarBit Variable}
WRITE .vSomeDoc to .vSomeVarBitVariable

{even as inderection operator}
WRITE .vSomeDoc to &vSomeVarBitVariable




----- Original Message ----- 
From: "MikeB" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Saturday, June 28, 2008 1:56 PM
Subject: [RBASE-L] - Re: Storage of External file in data base


> Oma, depending on your document type.  If it is plain TEXT, store it in the 
> DB as TYPE VarChar.  If it is any other type Store it as TYPE VarBit, then:
>
> Set var vSomeDoc VarBit = null
>
> Select SomeVarBitCol into vSomeDoc ind Vin0 from SomeTable where DocName = 
> 'SomeDocName'
>
> {use whatever extension Name is consistant with the Document Type}
> WRITE .vSomeDoc to SomeFileName.EXT  {whatever extension Name is consistant 
> with the Document Type}
>
>
> Thats it.
>
> If you want to put it in the DB from a file on disk, it's:
>
> Set var vDocName TEXT = 'SomeDocName'
> set var vSomeDoc VarBit = ['SomeFileName.EXT']
>
> {then either}
>
> insert into SomeTable SomeTextColForNameOfDoc, SomeVarBitCol values 
> .vDocName, .vSomeDoc
>
> {or if it is an update}
>
> Update SomeTable set SomeVarBitCol = .vSomeDoc where SomeTextColForNameOfDoc 
> = .vDocName
>
>
>
>
> ----- Original Message ----- 
> From: "Oma" <[EMAIL PROTECTED]>
> To: "RBASE-L Mailing List" <[email protected]>
> Sent: Saturday, June 28, 2008 12:28 PM
> Subject: [RBASE-L] - Storage of External file in data base
>
>
>> Ok,
>>
>> I can put the file into a table in database no problem!
>>
>> But I'm drawing a blank on how to export it back out!
>>
>>
>> SELECT docfilename INTO vdocfilename INDICATOR idocfilename FROM documents
>> WHERE docno = .vchoice1
>>
>> SET VAR vdocument = docimage IN documents WHERE (docno = .vchoice1)
>>
>> --write document to folder
>>
>> WRITE .vdoucment TO .vdocfilename
>>
>> LAUNCH .vdocfilename
>>
>>
>> This works in 6.5
>>
>> But in 8.0 the "TO" is not part of the Write command!
>>
>> I get "-ERROR- Syntax is incorrect for the command WRITE (2045)".
>>
>> What method do you use to export the var to a file?
>>
>> Any suggestion welcomed!
>>
>> Best Regards,
>>
>>
>> Oma Cox
>> O.C. Services Inc.
>> P.O. Box 5485
>> Brandon, MS 39047
>>
>> 662.820.7599
>> 601.992.6785
>>
>> www.ocservicesinc.com
>>
>>
>>
>
>
> 


Reply via email to