05-30-2002, 09:52 AM
i am using the mysql api
to do the following
connect to mysql db - works
the load_file statement - fails
my code reads as such query = "UPDATE bmp Set big = LOAD_FILE('/usr/home/dialwiz/public_html/2.bmp') Where dialerid = '5'"
this creates a new record in the correct table but doesnt load the image into the field
but when the same query is run on the server it works no problem
any help will be much apreciated
I would guess that '/usr/home/dialwiz/public_html/2.bmp' cannot be located from your machine.
05-30-2002, 11:10 AM
I know the files are there in that dir cause ive checked from ssh to the server adn executed the query there and it has worked
my guess too was that the machine couldnt locate the files but some suggestions on sorting the problem out would be helpful
Yes, I do believe you when you say that the files are located there. I don't believe that you can access them in the way that you do. I don't see you specify a server name.
05-30-2002, 11:52 AM
this is true the files are on the server and i shouldnt have to specify the server cause im already connected to that server
over sql statements work
have u any idea how i would modify the sql to include the server just incase it dont like the path im sending
I think it should be
05-30-2002, 12:11 PM
just tried that and still it doesnt work
What's the LOAD_FILE function ?
edit: Have you tried it with a image stored on your local drive ?
05-30-2002, 12:15 PM
its loads the file into a large binary (blob) field
do u have messenger ?
Originally posted by LMPhoenix
do u have messenger ?
05-30-2002, 12:22 PM
the mysql technical specs state the load_file must be local to the server
In that case, I've run out of ideas.
05-30-2002, 12:31 PM
dam thanks for the help anyhow
if i cant use the load_file method im gonna have to do it some other way
at present im using a couple of custom controls to upload the file to the server and then was trying to use the load_file to put it into the data base
as im using the mysql api to connect i dont think my data grid is properly bound to the database so i cant modify fields and just update any ideas how id change this
05-30-2002, 12:38 PM
LMPhoenix ... how did you find out about the mysql api? If you found any good online articles, can you please tell me the links. I am not currently working on a database program, but the next app I'm going to be starting is going to need to connect to mysql, and I would love some reading material. I have no idea how to do it. I thought I could just use ADO and use a connection object to connect to the mysql db.
05-30-2002, 12:42 PM
the mysql api is pretty simple i got 2 modules i could probably send to u
leave me your email
05-30-2002, 12:50 PM
okay thanks LMPhoenix ...
you can send it to email@example.com