Hard
You are using Visual Studio 2010 and the .NET Framework 4.0 to create an application. This application connects to a SQL Server 2008 database. The database has a table dbo.Documents that contains a column with binary data. You are creating the data access layer.
You add the following code to query the dbo.Documents table.
01 public void LoadDocuments(DbConnection cnx)
02 {
03 var cmd = cnx.CreateCommand();
04 cmd.CommandText = "SELECT * FROM dbo.Documents";
05 ...
06 cnx.Open();
07
08 ReadDocument(reader);
09 }
You need to ensure that the data can be read into a stream (System.IO.Stream). What line of code should you insert at line 07?
Author: Guillaume BroutStatus: PublishedQuestion passed 196 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
0
How to apply changes to a SqlConnection in C#0
Create a class that implements the ICollection interface.0
Write a LINQ query to select all rows from the first table in the dataset where the ContactName field is not null.0
How to get the products of a category in Dot-net1
How to use the 'using' statement in C#1
How to get the first element of an array in C#2
Retrieve a list of products from a catalog in a .NET application