picture from database, V4RB, other questions

Christian - ChrisKatDev.com christian at chriskatdev.com
Mon Jan 24 17:56:53 CST 2011


Hello again,



RB 2010R5, V4RB 4.8, MacOSX

when I use ReadPicture () with cursor, I have often Nil image...
but in database, picture is ok (I look at with VS)


Dim tableCouleurBKG As VTable = pDB.Table ("CouleurBKG")

sqlStr =  "SELECT recID, imgSlider FROM CouleurBKG WHERE recIDProjet = " + Str (pRecIDCurrentAlbum) + " AND numeroPage = " + Str (oldNbPages)
rs = pDB.sqlSelect (sqlStr,  EVCursorLocation.kClientSide, EVLockType.kNoLocks, EVCursorDirection.kRandom)

-- I have only One record with this request
        
 if (rs <> Nil) then
	dim res as boolean
          
	res = rs.FirstRecord ()
          
	fld = tableCouleurBKG.PictureField ("imgSlider")
	p = fld.ReadPicture ()

end if

rs = Nil



Where is problem ?

br
Christian


More information about the Valentina mailing list