Solved

Audio file in SQL Server CE

Posted on 2011-02-14
1
221 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
Comment Utility
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 Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

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…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

16 Experts available now in Live!

Get 1:1 Help Now