Skip to content

Retrieve wav file from mysql

learner learner

Asked Nov 3, 2010, 7:21 AM EDT1 answer
Share
LinkedInX
i found the way to store wave file in mysql database as blob format.

But how to retrieve the wave file from the database and store it as audio Stream in c#?

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Suthish Nair
    0
    SqlCommand com = new SqlCommand("select * from table", con);
    DataTable dt = new DataTable();
    SqlDataReader dr = com.ExecuteReader();
    dt.Load(dr);
    byte[] stream = (byte[])dt.Rows[0][0];
    refer link
    0