WebMethod(Description = "Inserta Imagen en Tabla Clientes")] public int SaveImage(byte[] buffer, string rrdbcoim) { string strcmd = "INSERT INTO imagen (im_dblogo, rr_dbcoim) VALUES (@logo, @codi)"; //use the web.config to store the connection string MySqlConnection conexion = new MySqlConnection(DSN1); conexion.Open(); MySqlCommand cmd = new MySqlCommand(strcmd, conexion); MySqlParameter param = new MySqlParameter("@logo", MySqlDbType.LongBlob); param.Size = buffer.Length; param.Value = buffer; cmd.Parameters.Add(param); cmd.Parameters.Add(new MySqlParameter("@codi", rrdbcoim)); conexion.Open(); int numRowsAffected = cmd.ExecuteNonQuery(); conexion.Close(); return numRowsAffected; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)