Data Access Flashcards
What should you apply to a method for it to execute
after an object is completely deserialized?
the OnDeserialized attribute
Which parameter indicates whether user credentials
are available even after the database connection is
opened?
the Persist Security Info parameter
What is the only method in the
IDeserializationCallback interface?
the OnDeserialization method
Which collection class is the most efficient at storing a small or large number of items?
the HybridDictionary class
Which LINQ class represents an XML tree?
the XNode class
Which property of the SqlConnection class should
you set to enable query statistics on the active
connection?
the StatisticsEnabled property
Which method should you invoke to retrieve all
network drives on a local system?
You should invoke the GetDrives method (and verify
the DriveType property).
Which method of the FileStream class should be invoked when work is completed with a file's contents?
the Close method
What type of XML structure will be generated for a
field to which no XML serialization attributes have
been applied?
An XML element: a tag with the name of the field and
its content with the value of that field
Which class should you use to establish a server port using Transmission Control Protocol (TCP)?
the TCPListener class
Which method of the BinaryFormatter class will load an object in memory from a contiguous stream of bytes?
the Deserialize method
When should you use a stack?
When organizing elements according to the Last In, First Out (LIFO) method
What is serialization?
the process of converting objects in memory into a
contiguous stream of bytes
Which method of the GZipStream or DeflateStream
classes should you invoke to decompress data from
the stream?
the Read method
When query statistics is enabled on the active SQL
Server connection, which method should you invoke to
access a collection of name/value pairs?
the RetrieveStatistics method
Which class includes algorithms for lossless
compression/decompression and a cyclic redundancy
check?
the GZipStream class
When property of the SqlRowUpdatedEventArgs
instance indicates whether an error has occurred
during an update operation?
the Status property
What should you apply to field to ensure it will not be
converted into a contiguous stream of bytes?
the NonSerialized attribute
When using the LINQ to SQL model designer, which
data type should you use for methods that are
associated with a stored procedure that returns
multiple result sets?
the MultipleResults class
Which class represents any error that occurs when using a data store?
the DbException class
Which enumeration indicates whether compression or
decompression should occur?
the CompressionMode enumeration
Which six states are available for database
connections?
Closed, Open, Connecting, Executing, Fetching, and
Broken
Which four values are specified in the
SqlRowUpdatedEventArgs.Status property?
the values Continue, ErrorsOccurred,
SkipCurrentRow, and SkipAllRemainingRows
How should you alter the name of an XML element
generated from a field?
You should apply the XmlElement attribute and
specify the new name.