V4MD : new question SQL insert into picture

Ricky ricky at babonmultimedia.com
Wed Oct 29 16:38:04 CST 2003


i see, binding must have a string on it. i have changed and it result zero
on error

but when i try to insert 1023 picture into 1023 record,
the database just only increased 45 Kb (but when i check on that record
using ViSql, that record still null), it should be 32MByte addition size for
all records
so what wrong with my db.SqlExecute ?
is there some that i missed?

here my script :

global db
set vc = new( Xtra "VCursor",GetRef(db),"SELECT fd_Code,fd_Image FROM
rdInventory ORDER BY fd_Code ASC",1,3,2)
set RecCount = GetRecordCount(vc)
repeat with i = 1 to RecCount
set fd_Code = GetField(vc,1 )
if member(fd_Code,2).name <> "" then
mySql = "UPDATE rdInventory SET fd_Image=1 WHERE fd_Code=2"
db.SqlExecute( mySql,[string(member(fd_Code,2).picture) ,fd_Code])
end if
nextrecord(vc)
end repeat

please give advice
Thanks
Ricky

----- Original Message -----
From: "Ruslan Zasukhin" <sunshine at public.kherson.ua>
To: <valentina at lists.macserve.net>
Sent: Wednesday, October 29, 2003 2:44 PM
Subject: Re: V4MD : new question SQL insert into picture


> on 10/29/03 8:00, Ricky at ricky at babonmultimedia.com wrote:
>
> > hello ruslan and all,
> >
> > about dump and load dump in my last question is not a problem anymore.
> > because i use import/export ODBC tool with MS access. thanks for
supportting
> > me
> >
> > but now i have difficulties in adding jpg into database
> > i cannot view the error message because database eat all memories then
make
> > my computer hang
> >
> > here is my script to add one picture:
> >
> > on insertpicture
> > global db
> > set vc = new( Xtra "VCursor",GetRef(db),"SELECT fd_Code,fd_Image FROM
> > rdInventory WHERE fd_Code = 'WMK11' ",1,3,2)
> > set RecCount = GetRecordCount(vc)
> >
> > set fd_Code = GetField(vc,1 )
> > if member(fd_Code,2).name <> "" then
> > mySql = "UPDATE rdInventory SET fd_Image=:1 WHERE fd_Code=:2"
> > myValues = "[" & member( fd_Code,2 )
> > myValues2 = "," & fd_Code & "]"
> > db.SqlExecute(mySql, myValues & myValues2 )
> > alert valentinaerror()
> > end if
> >
> >
> > Please give me suggestion about my mistake...
>
> Hi Ricky,
>
> Not correct binding. You need use real list of Lingo
> Should be.
>
>
> if member(fd_Code,2).name <> "" then
>     mySql = "UPDATE rdInventory SET fd_Image=:1 WHERE fd_Code=:2"
>
>     db.SqlExecute( mySql, [ member(fd_Code,2), fd_Code as string ] )
>
>     alert valentinaerror()
> end if
>
>
>
> --
> 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
> -------------------------------------------------------------
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>



More information about the Valentina mailing list