Mike,

the 'cardholder.Picture.TempFileName' does not return the binary data itself (the JPEG image) but only the path to this file.

So I thought if I could get that path into a RBASE Variable, then I should be able to let RBASE evaluate the contents of this var to a VARBIT field.

I had in mind that I did something similar before with an .rtf text file that I loaded into a VARCHAR field.

But if this isn't possible there might be a workaround.

Grtz

Luc D.

--------------------------------------------------
From: "Mike Byerley" <[email protected]>
Sent: Monday, June 06, 2011 10:31 PM
To: "RBASE-L Mailing List" <[email protected]>
Subject: [RBASE-L] - re: loading jpeg in BLOB

Luc,
You can't return a binary (varbit) file from the Script Engine.  It will
only return text, note or varchar.

You will have to do the file handling inside of the script engine and that
is something I haven't tasked myself to do yet, so if it can be done, I
would have to figure it out first.

Then "IF" it is possible, I could show you the changes to make in the script
code to do it.

I know that ADO.Stream Object can handle binary data as that is what I use
for XMLHTTPRequest, so that is a possibility.  I can't get to it tonight,
but I will look into it if you want.

The answer to your question is that you have the correct syntax, but if
'cardholder.Picture.TempFileName' is binary data, it won't work with the
RMScript.dll as you have discovered, for the reasons I list above.


----- Original Message ----- From: "Luc Delcoigne" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Monday, June 06, 2011 2:06 PM
Subject: [RBASE-L] - re: loading jpeg in BLOB


Hi,

This topic has been answered before, but I can't find it anymore.

I want to load an JPEG into a BLOB from  a variable.

this is a question of correct syntax.

What I have is :

SET VAR vfoto = (dlcall('RMScript.dll', 'MScrEval',
'cardholder.Picture.TempFileName'))
--vfoto contains the path to the JPEG

SET VAR vfoto1 VARBIT = NULL
SET VAR vfoto1 VARBIT = [.vfoto]

-- this is where it is going wrong.

How can I get the contents of the variable in the BLOB ?

Luc D.



--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text to search for.
================================================


Reply via email to