List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:February 5 2002 2:55am
Subject:Re: BLOB Help Please (Loading into table)
View as plain text  
At 0:35 +0000 2/5/02, David Ayliffe wrote:
>Hello,
>
>Thanks for your time.  I'm having some problems loading images into a
>table.  I'm using the statement:
>
>INSERT INTO BLOBTEST set b1=load_file<'c:\1.jpg');

You'll probably need to double the '\' character.  Or perhaps use
a '/' instead.  (That's what you have to do for Windows filenames with
LOAD DATA, and the same rules may apply here, too.)

>
>The table (blobtest) is made up of 2 columns : id1 (auto counter) and b1
>(BLOB)
>
>When I try and run this statement (above) I get a record inserted with a
>value for the counter, but for the binary file - I get the value NULL.
>
>I have checked Pauls' book and it states about the load_file that NULL
>will be returned if:
>
>* the file doesn't exist on the server (it does - at c:\)
>* is not world-readable (I'm running xp so no unix ACL's but I'm running
>with admin rights)
>* user must have FILE privilages in mysql (I've dropped my old user and
>created a new one with "grant all on test.* to orange@'%' identified by
>'orange';")
>
>
>Any ideas why this is not working? - I just need to load an image to
>test things.
>
>ALSO can images be loaded without using the set statement? - IMPORTANT
>
>Thank you.
>
>
>Thanks lots
>David Ayliffe
>
>ICQ# 125646758

Thread
BLOB Help Please (Loading into table)David Ayliffe5 Feb
  • Re: BLOB Help Please (Loading into table)Paul DuBois5 Feb