[V4RB-VServer] can't work with pictures

Eric Ferrer wonderfef at noos.fr
Fri Jun 10 09:26:22 CDT 2005


Hi Ruslan,


> Eric, can you tell me what bugs really stop you from 2.0 ?
> I do not see any reports from you in our bug tracker.

I still can't convert my database to v2 format.
The Convert method always quits at 57.7 MB

Moreover, I wish there were a "What has changed" read-me file so that  
I would know exactly what to change in my code and not discover  
changes through strange behaviours or posts in the list.


To get back to my initial problem, you told me that the way I built  
my database is OK.
So maybe my problem comes from the way I'm adding a picture :

   dim cursor as VCursor
   dim thumb, pix as picture
   dim id as string

   id = GetUniqueID()

   cursor = theDatabase.SqlSelect("SELECT * FROM Pictures WHERE ID =  
'" + id + "'", 2, 1)

   if cursor = nil then
     MsgBox "cursor is nil"
     Return
   end if

   cursor.SetBlank

   pix = NewPicture(myPicture.Width, myPicture.Height, 32)
   pix.Graphics.DrawPicture myPicture, 0, 0
   thumb = NewPicture(32, 32, 32)
   thumb.Graphics.DrawPicture myPicture, 0, 0, 32, 32, 0, 0,  
myPicture.Width, myPicture.Height

   cursor.Field("ID").SetString id

   cursor.PictureField("Thumb").SetPicture(thumb, 100)

   cursor.PictureField("Picture").SetPicture(pix, 100)

   cursor.Field("Name").SetString trim(EditField1.Text)

   if cursor.add = false then
     MsgBox "can't add record" + EndOfLine + theDatabase.ErrString +  
" (#" + CStr(theDatabase.ErrNumber) + ")"
   else
     theDatabase.Flush
     close
   end if

To finish, what do mean the errors :
> CURSOR(0x12D6EC0): Field index is too large!
> ERROR #1009: Invalid identifier

???

Thanks !
Eric


More information about the Valentina mailing list