how to Play a sound file stocked in a data base Access
<p>Hello
Please can you give me the code that allows me to read a file.wav ("alarme.wav") stored in a database, I tried the following code:</p>

<pre><code>private void button1_Click (object sender, EventArgs e)
{

OdbcConnection cn = new OdbcConnection ("DSN = cp1");
cn.Open ();
OdbcCommand cmd1 = new OdbcCommand ("select path from WHERE Code Alarm alarm = 32 ",     cn);
cmd1.Connection = cn;
fileName = cmd1.ToString ();
WaveOut wave = new ();
wave.DeviceNumber = 0;
playSound (0);
</code></pre>

<p>But he gave me the following error:
"Could not find file 'C: \ Users \ wafa \ Documents \ Visual Studio 2010 \ Projects \ ALARMED \ ALARMED \ bin \ Debug \ System.Data.Odbc.OdbcCommand'."
At the line:
"waveReader = new NAudio.Wave.WaveFileReader (fileName);" in my "playSound" function:</p>

<pre><code>public void PlaySound (int deviceNumber)
{
disposeWave ();// stop previous sounds Before Starting
waveReader = new NAudio.Wave.WaveFileReader (fileName);
var waveOut NAudio.Wave.WaveOut = new ();
waveOut.DeviceNumber = deviceNumber;
var output = waveOut;
output.Init (waveReader);
output.Play ();
}
</code></pre>

<p>Thank you in advance.
Good day :)</p>
