hi nag,
try this codes, then confirm if your column on server if mediumblob type:
String connString = "Driver={MySQL ODBC 3.51
Driver};Server=mysql9.servername.com;Database=xyz;user
id=kv;password=kv";
OdbcConnection myConnection = new OdbcConnection(connString);
const string SQL = "INSERT INTO PictureTable
(Title,MIMEType,Image) VALUES (?Title, ?MIMEType, ?ImageData)";
OdbcCommand myCommand = new OdbcCommand(SQL,myConnection);
myCommand.Parameters.AddWithValue("?Title",
TextBox1.Text.Trim());
myCommand.Parameters.AddWithValue("?MIMEType", MIMEType);
byte[] imageBytes = new byte
[fileUpload1.PostedFile.InputStream.Length];
fileUpload1.PostedFile.InputStream.Read(imageBytes, 0,
imageBytes.Length);
myCommand.Parameters.AddWithValue("?ImageData",
imageBytes);
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
--
Flavio Henrique Moura Stakoviak
DGTAF - Secretária da Fazenda