Solved

Audio file in SQL Server CE

Posted on 2011-02-14
1
225 Views
Last Modified: 2012-05-11
Hello Expert

I am trying to load an Audio file (.wma) into compact Edition Database.

My audio file is in c:\Audio\ directory

What is the SQL command that I execute from SQL Server Manager the load the file.

Also what is the best data type to make the Audio field.

I am a beginner, so detail code please

Thanks
0
Comment
Question by:crp81
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 40

Accepted Solution

by:
lcohan earned 500 total points
ID: 34901252
Here, try this but remember your C:\ path or wherever you put your binary file is relative to the SQL server box and not client where you run the query. If SQL is installed on your client computer run it from there ok:

create table #tempfile (audio_file varbinary(max))
INSERT INTO #tempfile   SELECT * FROM OPENROWSET(BULK 'c:\audio_test.wma', SINGLE_BLOB) as f;
select * from #tempfile
drop table #tempfile
0

Featured Post

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question