如何保存音频文件(可以将哪种格式的文件保存在sql数据库中) [英] how to save audio files(in which format the files can be saved in sql database)

查看:740
本文介绍了如何保存音频文件(可以将哪种格式的文件保存在sql数据库中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想获取有关保存音频文件的信息.我想将音频文件保存在SQL数据库中,但我完全感到困惑,我该怎么做,有人可以帮助我吗?

感谢

hello, i want to get information about audio files saving. i want to save audio file in SQL database and i am totally confused how can i do this, can anybody help me out.

thanks

推荐答案

音频文件只是具有定义格式的二进制文件.

您可以使用File.ReadAllBytes()将其转换为byte[]并将其保存在数据库的二进制列中.

尼克
An audio file is just a binary file with a defined format.

You can convert it to a byte[] using File.ReadAllBytes() and save it in a binary column in your database.

Nick


这篇关于如何保存音频文件(可以将哪种格式的文件保存在sql数据库中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆