Solved

Audio file in SQL Server CE

Posted on 2011-02-14
1
222 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
1 Comment
 
LVL 39

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now