V4MD : new question SQL insert into picture

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Oct 29 08:44:50 CST 2003


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
-------------------------------------------------------------



More information about the Valentina mailing list