1. Helge Tjelta
  2. Valentina Database ADK
  3. Friday, October 16 2015, 11:50 AM
  4.  Subscribe via email
Hi, how do I get a picture from a db into my web app... ?

In desktop app, i have the VPicture available, but when doing a Webapp, VPicture is gone.... WHY

using V4RB 5.8.5
Comment
There are no comments made yet.
Helge Tjelta Accepted Answer
I ment 5.8.8, also checked the new 6.0.10. Still no VPicture

Do I have to go BLOB ?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
Ruslan Zasukhin Accepted Answer
web application is a console application.

as I remember, for console-safe apps in SDK of Xojo was disabled all picture-related methods.
so we also was need disable them

yes you can try get PNG or JPG using BLOB methods.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 2
Helge Tjelta Accepted Answer
but we have imagewell as an object for web apps, and use icons and pictures all over the place... I don't get it. ?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 3
Ruslan Zasukhin Accepted Answer
well, we can check once again this point.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 4
Ruslan Zasukhin Accepted Answer
I was wrong.

{ (REALproc) Picture_Read, REALnoImplementation, "ReadPicture as Picture", REALconsoleSafe },

{ (REALproc) Picture_WriteAs, REALnoImplementation,
"WritePictureAs( inPict as Picture, inPictType as Integer = 20, inQuality as Integer = 50 )",
REALconsoleSafe },

Methods are console-safe.
Then we need check this from another point of view.

Sergey we have own example with pictures?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 5
Helge Tjelta Accepted Answer
Nice, I'm waiting :)
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 6
Ruslan Zasukhin Accepted Answer
Sergey points that class VPicture itself is marked as NOT console safe.

Helge, meanwhile try to use VCursosr.BlobField() to extract compressed JPG and send it to browser
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 7
Johnny Harris Accepted Answer
I grabbed this snippet of code from a web project I have, hopefully it will work for you.


dim mb as MemoryBlock = cur.BlobField("profile_img").ReadData()
dim p as Picture

if mb <> nil then
p = Picture.FromData( mb )
user.Profile.Image = p
end if
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 8
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.