Problems with VPicture

Ruslan Zasukhin ruslan at paradigmasoft.com
Fri Jul 17 02:16:33 CDT 2009


On 7/17/09 1:09 AM, "Steve Albin" <steve at steve-albin.com> wrote:

Hi Steve,

I am sorry, I cannot test this right now,
Because on vacation, week yet.

But please report this with simple project to Mantis,
So Kirill ill try reproduce it.

> I am running V4RB 4.1 on a Mac creating a standalone app.  For the life of me,
> I cannot get a picture inserted into a database.
> 
> I've tried both Field_Picture examples with success.  Then, I make a simple
> project on my own trying to replicate the procedure and no matter what I do it
> will not load a picture.
> 
> Here is my code for adding a picture.  The pic is a picture I've added to the
> RB project.  It is located in the same folder as the project and the built
> project.
> 
> Here is the code I am using to add the picture.  I couldn't be simpler, but it
> doesn't work.
> 
> Sub Action() 
>     dim pic As Picture
>     pic = DSC_0281 // a picture contained in the project folder
> 
>     vcImages = app.vDB.SQLSelect("Select Recid, *  from Images where false  ",
>         EVCursorLocation.kServerSide, EVLockType.kNoLocks,
> EVCursorDirection.kRandom)
> 
>     vcImages.SetBlank
>     'vcImages.PictureField("pCoverPic").WritePictureAs(pic) // tried this call
> both ways 
>     vcImages.PictureField("pCoverPic").WritePictureAs(pic, EVPictType.kJPG,
> 50) 
>   
>     call vcImages.AddRecord()
>     app.vDB.Flush

Strange.

I am sure that example API Field_Picture, do exactly this ...
No ?

It assign picture stored in the project ...
Also note there is no big sense add into db picture from PROJECT, yes?
Usually you add them from RAM or Disk ...

I remember that in the past, was many posts on this list,
That some pictures start work only after past them to clipboard using RB
code .. It was just 2-3 extra lines of code .. You can try search list
archive to find that letter. Use "clipboard +picture +REALbasic" as key word
for search. 

>  I look at the log after running this and there is no indication of a problem.
> There is no warnings file generated and I have it turned on.

> Can anyone give me any pointers on a "gotcha" that I may have overlooked?  I
> have no problem adding VarChar, ULong, VText, VBoolean, and VDate fields to
> this database.  Just VPicture.

But you told example work for you, right ?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list