Click here to Skip to main content
15,910,981 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how can I read file.wav and file.mp3 stored in a data base using their path in C#
Posted

Tried looking here[^]? There have been similar questions regarding the topic. Also, I bet there are a lot of stuff on Google too. For the retrieving part, you need to be familiar on ADO.Net to be able to retrieve the path from the database.
 
Share this answer
 
You don't use a path for retrieving data from a database, you should use a query (usually a SQL query).
I believe binary files like .wav and .mp3 are stored as BLOBs inside the database. You should read a database tutorial before starting developing.
 
Share this answer
 
Hi,
this is your code:

C#
  [DllImport("kernel32.dll")]

System.Media.SoundPlayer player = new SoundPlayer();
              player.SoundLocation = "Your sound Location.wav";
              player.LoadAsync();
              player.PlayLooping();   //asynchronous (loop)playing in new thread
              Thread.Sleep(1000);
              player.Stop();
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900