i'm having a problem in retrieving .wav file in ms access in my code in c# it says that the wave header is corrupt! can someone help me with this? thanks :)
cmd = new OleDbCommand("Select SOUND from SOUND where TITLE like" + "'" + textBox1.Text + "'", conn);
dr = cmd.ExecuteReader();
if (dr.Read() == true)
{
byte[] result = (byte[])dr["SOUND"];
MemoryStream ms = new MemoryStream(result, true);
SoundPlayer sp = new SoundPlayer(ms);
ms.Position = 0;
sp.Stream = null;
sp.Stream = ms;
sp.Play(); // error here!! :(
}
else
MessageBox.Show("error");