Mysql Help needed

LMPhoenix
05-30-2002, 10: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

rive
05-30-2002, 11:06 AM
I would guess that '/usr/home/dialwiz/public_html/2.bmp' cannot be located from your machine.

LMPhoenix
05-30-2002, 12:10 PM
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

rive
05-30-2002, 12:28 PM
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.

LMPhoenix
05-30-2002, 12:52 PM
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

rive
05-30-2002, 01:01 PM
I think it should be
LOAD_FILE('//YourServerName/usr/home/dialwiz/public_html/2.bmp')

LMPhoenix
05-30-2002, 01:11 PM
just tried that and still it doesnt work

rive
05-30-2002, 01:13 PM
What's the LOAD_FILE function ?

edit: Have you tried it with a image stored on your local drive ?

LMPhoenix
05-30-2002, 01:15 PM
its loads the file into a large binary (blob) field
do u have messenger ?

rive
05-30-2002, 01:16 PM
Originally posted by LMPhoenix
do u have messenger ?
Not here

LMPhoenix
05-30-2002, 01:22 PM
the mysql technical specs state the load_file must be local to the server

rive
05-30-2002, 01:26 PM
In that case, I've run out of ideas.

LMPhoenix
05-30-2002, 01: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

Cogen
05-30-2002, 01: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.

Thanks.

LMPhoenix
05-30-2002, 01:42 PM
the mysql api is pretty simple i got 2 modules i could probably send to u
leave me your email

Cogen
05-30-2002, 01:50 PM
okay thanks LMPhoenix ...

you can send it to bjmurphy@sympatico.ca

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum