Copy raw image data from one DB to another
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon May 9 22:00:29 CDT 2005
On 5/9/05 9:41 PM, "Chuck Neal" <chuck at mediamacros.com> wrote:
> Valentina 1.11
> Director MX 2004
> Windows XP
>
> Ok, I am digging back through my code trying to find out why building
> this database is destroying my file. Here is what I am using to add
> images...
>
>
> on addImage me, vImage, Id
> if ilk(vImage) <> #member then return 0
> if vImage.type <> #bitmap then return 0
> c = vImage.image.getPixel(1,0)
>
> iSQL = "SELECT * FROM image"
> iCursor = Xtra("VCursor").new(GetRef(pDb), iSQL, 1, 3, 1)
> if valentinaerror() <> 0 then
> put "Error" && valentinaError() && valentinaErrorString()
> end if
> SetBlank(iCursor)
> if valentinaerror() <> 0 then
> put "Error blank" && valentinaError() && valentinaErrorString()
> end if
> SetField(iCursor, "id", id)
> if valentinaerror() <> 0 then
> put "Error Field" && valentinaError() && valentinaErrorString()
> end if
> SetPicture( iCursor, "image", vImage, 90)
> if valentinaerror() <> 0 then
> put "Error Picture" && valentinaError() && valentinaErrorString()
> end if
> AddREcord(iCursor)
> if valentinaerror() <> 0 then
> put "Error Add" && valentinaError() && valentinaErrorString()
> end if
> pdb.flush()
> if valentinaerror() <> 0 then
> put "Error Flush" && valentinaError() && valentinaErrorString()
> end if
> iCursor = void
> return id
> end
>
> I am going through a list of files, loading the member and then calling
> this function. It works fine for the first 295-300 images. Then I
> start getting this...
>
> -- "Error Flush -39 No error"
>
> After that, every single call to the add gives me the same error. The
> strange part is that it happens on flush and not on any of the other items.
>
> First is there something in my code that is wrong? I can do small
> record sets with no problems, but once it passes that "magic" number
> then the file is not longer able to be opened by the Xtra or Studio.
>
> I have tried about 10 different methods to get this to work and it is
> consistently failing here no matter what I try. Any insight?
Code looks correct.
Reproducible? 100% ?
Then send me something easy to reproduce.
I will debug
--
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