I'll give you the points but please provide an example for my database.
Main Topics
Browse All TopicsI am doing a delphi program. I need the SQL command that uploads a file to a mySql database.
The table structure is:
id integer not null auto_increment primary key,
id_message integer,
name varchar(50),
filename varchar(100),
file blob
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
If you want to insert binary data into a string column (such as a BLOB), the following characters must be represented by escape sequences:
NUL
NUL byte (ASCII 0). Represent this character by `\0' (a backslash followed by an ASCII `0' character).
\
Backslash (ASCII 92). Represent this character by `\\'.
'
Single quote (ASCII 39). Represent this character by `\''.
"
Double quote (ASCII 34). Represent this character by `\"'.
When writing application programs, any string that might contain any of these special characters must be properly escaped before the string is used as a data value in a SQL statement that is sent to the MySQL server. You can do this in several ways:
* Process the string with a function that escapes the special characters. For example, if you write C code, you can use the C API function mysql_real_escape_string()
You can find a binary encoder/decoder called DIMime at,
http://www.torry.net/codin
If instead you wish to use the MySQL C api to encode the file you could use,
http://www.mysql.com/porta
Business Accounts
Answer for Membership
by: ZontarPosted on 2004-03-16 at 01:45:22ID: 10604757
Try LOAD DATA INFILE:
n/LOAD_DAT A.html
http://www.mysql.com/doc/e