Import pictures

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Nov 26 00:20:01 CST 2003


on 11/25/03 8:32 PM, 08.55615588 at telia.com at 08.55615588 at telia.com wrote:

> 
> Hi,
> 
> Okay, this is very basic instructions but this is how I do it:
> 
> 
> 1) Click New Database and create new file
> 
> 2) Click Execute SQL query
> 
> 3) Click Import from txt
> 
> 4) Click Execute SQL query (I now got 10 text records)
> 
> 5) Click Import pictures (I can see all 10 pictures but only the last one is
> added)
> 
> If you got any questions just ask me.

Hi Richard,

Okay, I see the main problem!!!

Look on your loop, and asnwer, WHERE you MOVE on records of cursor ?!


      set count to 1

      repeat while count <= 10
        set c = String(count)
        
        path = the moviePath & "pictures:" & count & ".jpg"
        set the filename of member "fimage" to path
        
        setPicture( gCursor,"Image",  member "fImage" )
        updaterecord (gcursor)
        
        put c into field "dbGoToRecord"
        set count = count+1
      end repeat


The correct loop must looks as


      set count to 1
      FirstRecord( gCursor )  -- you MUST SAY that you want
                                -- go to first record

      repeat while count <= 10
        set c = String(count)
        
        path = the moviePath & "pictures:" & count & ".jpg"
        set the filename of member "fimage" to path
        
        setPicture( gCursor,"Image",  member "fImage" )
        updaterecord (gcursor)
        
        put c into field "dbGoToRecord"
        set count = count+1


        NextRecord( gCursor )   -- you MUST SAY that you want next record
                                -- now

      end repeat


-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list