TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
xiaming81
NA
2
0
INSERT BINARY DATA IN MYSQL
May 3 2004 9:21 AM
I've tried both odbc and MySQLDriversCS from SourceForge, but none of them works properly. odbc insert nothing into the field, and MySQLDriverCS insert "System.Byte[]" string into the field. code: stream = new FileStream(control.Text, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); bReader = new BinaryReader(stream); MySQLParameter par = new MySQLParameter("@fieldname", System.Data.DbType.Binary); par.Value = bReader.ReadBytes((int)stream.Length); command.Parameters.Add(par); then is the query like: INSERT INTO TableName (filedname) VALUES (@fieldName) but it does not work, why?
Reply
Answers (
1
)
Updating Identity Column / DataAdapter
Xml > DataSet > Database