The "'cardholder.Picture.TempFileName' is a string and should be returned by the code you posted, so what is the datatype of the variable "vFoto" and did you declare it before its use with DLCall?
I'm just guessing here, but does the cardreader write the binary file of the photo to the location of "'cardholder.Picture.TempFileName"? To Test: Can you test your VB code in Access or something and when you can determine what "'cardholder.Picture.TempFileName" value is, then try to open that file with PAINT and see if it contains an image... ----- Original Message ----- From: "Luc Delcoigne" <[email protected]> To: "RBASE-L Mailing List" <[email protected]> Sent: Tuesday, June 07, 2011 2:12 AM Subject: [RBASE-L] - re: loading jpeg in BLOB : 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. : > : > : :

