Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

saving binary data in sql server 2005 using varbinary(max)

Posted on 2008-06-10
3
Medium Priority
?
7,438 Views
Last Modified: 2011-06-17
I want to save documents in sql server 2005 and only by using varbinary(max) as datatype. I am working on C# winform application.
0
Comment
Question by:shore-support
3 Comments
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 2000 total points
ID: 21759093
u can read documnets as raw file

byte[]bytes = System.IO.File.ReadAllBytes(Filename);

then using a command object

Command.CommandText = "insert into table (...,varmaxfield) values(.....,@varmaxvalue)";

Command.Parameters.AddWithValue(@varmaxvalue,bytes);

Command.ExecuteNonquery();
0
 

Author Comment

by:shore-support
ID: 35988536
abandoned qustion
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

963 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