script de update
(1) By PauloFreire (11021975) on 2020-09-17 12:02:31 [link] [source]
472/5000 Hello, I need a script to update my table with photos, I have to pass the path of the photo ???
Doing this give me an error: [08:56:49] Error while executing SQL query on database 'Database': Could not open file C: FotosColaboradores 3302.jpg for reading: The system cannot find the file specified.
But the picture is there, on the right path.
I appreciate any help.
UPDATE CRACHAS SET FOTO = ReadFile ('C: FotosColaboradores 3302.jpg') WHERE ID = 3302;
(2) By Richard Hipp (drh) on 2020-09-17 12:12:48 in reply to 1 [link] [source]
Have you tried using "/" instead of "\" in the filename?
(3) By PauloFreire (11021975) on 2020-09-17 12:25:21 in reply to 2 [link] [source]
Yes, I tried, and it gives the same error. Do you have a standard path?
(4) By Richard Damon (RichardDamon) on 2020-09-17 12:25:31 in reply to 1 [link] [source]
As Mr. Hipp says, you need to watch out how back slash is interpreted, as it is an escape character, and might be so interpreted as several levels. Also, you seem to have spaces with the back-slash (unless that is forum formatting) which is likely not in the actual filename.
Using / in the filename tends to get around the problem, at least as long as you don't pass it to some extrnal program that looks on it as the option character.
(5) By PauloFreire (11021975) on 2020-09-17 12:32:07 in reply to 4 [source]
Okay, thank you very much, I did it, with the backslash and normal at the same time. /