Topic Name: ADO.NET
|
|
_______ is namespace for the SQL Server provider classes.
|
a) Sysytem.Data.Oracle
|
b) System.Data.SqlClient
|
c) System.Data.Sql
|
d) System.Data.Odbc
|
_________ contains SQL Server
data types.
|
a)System.Data.SqlserverTypes
|
b) System.Data.Oralce.Types
|
c) System.Data.OdbcTypes
|
d)System.Data.SqlTypes
|
______ Used as wrappers for SQL
statements or stored procedure calls.
|
a)SqlCommand
|
b)OracleCommand
|
c)OleDbCommand and ODBCCommand
|
d) All the above
|
A syntax for connection string
|
a)"Server;datbasename=;uid=id;pwd=pwd"
|
b)“Server=servername;database=dbName;uid=id;pwd=pwd”
|
c)"add name=con1
;databasename=db1 ;connectionstring=con1;uid=id;pwd=pwd"
|
d) None of the above
|
Can we directly assign a datareader
to a gridview
|
a)Yes
|
b)No
|
d) None of above
|
________is describes the
database instance to connect to; each SQL Server process can
expose several database instances
|
a) integrated security = SSPI
|
b) server=(local)
|
c) None of above
|
d) database=Northwind(
Any database name)
|
______________is Executes the
command but does not return any output
|
a) ExecuteNonQuery()
|
b) ExecuteScalar()
|
c) ExecuteReader()
|
d) None of above
|
____________is Executes the
command and returns a typed IDataReader
|
a) ExecuteNonQuery()
|
b) ExecuteReader()
|
c) ExecuteScalar
|
d)None of above
|
______________is Executes the
command and returns a single value
|
a) ExecuteNonQuery()
|
b) ExecuteReader()
|
c) ExecuteScalar()
|
d) None of above
|
____________is Executes the command and returns an
XmlReader object, which can
be used to traverse the XML
fragment returned from the database
|
a) ExecuteNonQuery()
|
b) Executescalar()
|
c) ExecuteXmlReader()
|
d) None of above
|
Can we get a XML presentation of a
table from Dataset?
|
a)Yes
|
b)NO
|
____________class consists of a
set of data tables, each of which will have a set of data columns and data
rows
|
a) Data Adapter
|
b) DataTable
|
c) DataSet
|
d) DataRow
|
Data adapter includes
_______________command objects
|
a) Select command
|
b) insert command
|
c) update command, delete command
|
d) All of above
|
A ___________is very similar to
a physical database table — it consists of a set of columns with particular
properties, and might have zero or more
rows of data
|
a) dataset
|
b) data table
|
c) datacoloumn
|
d) All of above
|
________,______________,_____________
and ________________.Used to generate SQL
commands (such as INSERT, UPDATE, and
DELETE statements) from a SELECT statement
|
a) SqlCommandBuilder
|
b) OleDbCommandBuilder, ODBCCommandBuilder
|
c) OracleCommandBuilder
|
d) All of above
|
where we should write a
connection string
|
a) in web.config
|
b)in App.config file
|
c) Machine Config
|
d)all of the above
|
If we use a DataAdapter, we don’t
need to open or close database connection explicitly.
|
a)Yes
|
b)No
|
_________________,________________,__________,________________ Used as a forward only,
connected data reader
|
a) OleDbDataReader
|
b) OracleDataReader
|
c) SqlDataReader
|
d) All of the above
|
Which method is
used to return the database table in XML format?
|
a)Serialization format
|
b) Binary format
|
c)ReadXML
|
d)Soap Format
|
What object is used to generate the
commands automatically for a specific SqlDataAdapter?
|
a) sqlConnection
|
b) sqlCommandBulider
|
c) dataset
|
d) sqlDataReader
|
Which method of DataTable can copy all the content
from DataReader to DataTable.?
|
a)Copy
|
b)Load
|
c)Unload
|
d)all of the above
|
__________ object is designed
for disconnected use and can contain a set of DataTables
and include relationships between these
tables
|
a) Data Adapter
|
b) system.Data
|
c) Constraint
|
d) DataSet
|
___________a container of data
that consists of one or more DataColumns and, when populated,
will have one or more DataRows
containing data
|
a) DataSet
|
b) DataTable
|
c) Datacoloumn
|
d) DataRow
|
____________class which represent
a number of values, akin to a row from a database table,
or a row from a spreadsheet
|
a) DataRow
|
b) DataColoumn
|
c) DataAdapter
|
d) DataTable
|
______________ object contains
the definition of a column, such as the name and data type.
|
a) DataColoumnMapping
|
b) DataColumn
|
c) DataTable
|
d) DataSet
|
_______________a link between
two DataTable classes within a DataSet class. Used for foreign
key and master/detail relationships
|
a) DataAdapter
|
b) DataSet
|
c) Constraint
|
d) DataRelation
|
_______________class defines a
rule for a DataColumn class (or set of data columns),
such as unique values
|
a) DataRow
|
b) Constraint
|
c) DataTable
|
d) DataSet
|
__________________Maps the name
of a column from the database with the name of a
column within a DataTable.
|
a) DataTableMapping
|
b) DataColumnMapping
|
c) Constraint
|
d) DataAdapter
|
______________________ Maps a
table name from the database to a DataTable within a DataSet
|
a) DataColoumnMapping
|
b) DataTableMapping
|
c) DataSet
|
d) DataRow
|
Namespaces expose the ____________________ used in OLE DB .NET data access.
|
a) Sqlprovider classes
|
b) Oracleprovider classes
|
c) ODBCprovider classes
|
d) OLE DB provider classes
|
________________denotes the
database server to connect to. SQL Server permits a number
of separate database server instances to
be running on the same machine, and here you're
connecting to the default SQL
Server instance
|
a) database=Northwind (lets say)
|
b) integrated security=SSPI
|
c) server=(local)
|
d) None of above
|
________________ uses Windows
Authentication to connect to the database, which is highly
recommended over using a
username and password within the source code
|
a) database=Northwind (lets say)
|
b) integrated
security=SSPI
|
c) server=(local)
|
d) None of above
|
Which
namespace contains following classes: DataSet, DataTable, DataColumn, and
DataRow?
|
a)System.Data.SqlserverTypes
|
b)System.data.sqlclient
|
c) system.data
|
d)system.configuration
|
Which object can point to the
parameter in stored procedure?
|
a) parametirsed
|
b)AddParameter
|
c)ConnectionParameter
|
d)Parameter
|
__________ method executes the
command and returns a typed data reader object, depending
on the provider in use
|
a) ExecuteNonQuery()
|
b) ExecuteXmlReader()
|
c) ExecuteReader()
|
d) None of Above
|
______________method is commonly
used for UPDATE, INSERT, or DELETE statements,
where the only returned value is
the number of records affected
|
a) ExecuteNonQuery()
|
b) ExecuteScalar()
|
c) ExecuteReader()
|
d) None of Above
|
In many times, it is necessary
to return a single result from a SQL statement, such as the count
of records in a given table than _________
method is used
|
a) ExecuteNonQuery()
|
b) ExecuteScalar()
|
c) ExecuteReader()
|
d) None of Above
|
A ___________ is the simplest
and fastest way of selecting some data from a data source,
but also the least capable
|
a) Datarecorder
|
b) Datareader
|
c) XMLReader
|
d) All the above
|
The_______________has been
designed as an offline container of data. It has no notion of
database connections
|
a) DataSet class
|
b) DataAdapter
|
c) DataTable
|
d) All of above
|
A ___________ consists of a set
of data tables, each of which will have a set of data columns
and data rows
|
a) DataSet class
|
b) DataAdapter
|
c) DataTable
|
d) All of above
|
________________property of DataColumnObject is true, permits the column to be set to
DBNull
|
a) AllowNull
|
b) AllowDBNull
|
c) Null
|
d) None of above
|
________________ property of
DataColumnObject defines that this
column value is automatically
generated as an incre- menting
number
|
a) AllowIncrement
|
b) AutoIncrement
|
c) Increment
|
d) All of above
|
________________property of
DataColumnObject defines the initial
seed value for an AutoIncrement column
|
a) None of below
|
b) AllowIncrement
|
c) IncrementSeed
|
d) AutoIncrementSeed
|
________________property
of DataColumnObject defines the step between automatically
generated
column values, with a default of one
|
a) AllowIncrement
|
b) AutoIncrement
|
c) AutoIncrementSeed
|
d) AutoIncrementStep
|
________________ property of
DataColumnObject can be used for displaying the name of the
column on screen.
|
a) ColumnName
|
b) ColumnMapping
|
c) Caption
|
d) All of above
|
________________property of
DataColumnObject can define a default value for a column
|
a) DefaultValue
|
b) DataType
|
c) Current
|
d) Default
|
Can we add one SQL Server table and
another Oracle table inside a single DataSet?
|
a)Yes
|
b)NO
|
_____________________is
datarowstate which indicates that the row has not been changed
since the last call to AcceptChanges().
|
a) Original
|
b) Modified
|
c) Expression
|
d) Proposed
|
_____________________ is
datarowstate which indicates that
the row has not been changed
since the last call to
AcceptChanges().
|
a) Added
|
b) Deleted
|
c) Depatched
|
d) Unchanged
|
_____________________ is
datarowstate state which indicates that the row has been newly
added to a DataTable's Rows
collection
|
a) Added
|
b) Deleted
|
c) Depatched
|
d) Unchanged
|
________________returns an
integer representing how many table rows were affected by the query
|
a) ExecuteNonQuery()
|
b) ExecuteScalar()
|
c) ExecuteReader()
|
d) None of Above
|
__________- these are the
extreamly useful controls to output the data on the web pages
|
a) All of below
|
b) Repeater
|
c) DetailsView, FormView
|
d) GridView, DataList
|
All data-bindable controls
support the top- level ________________ method.
|
a) Eval()
|
b) Bind()
|
c) DataBind()
|
d) All of above
|
Changes made to the DataSet need
to save on Server, which method helps to do this?
|
a)Updation
|
b)Update
|
c)Updatemethod()
|
d)update()
|
The _____________ expression is
identical but allows to insert data into attributes of server controls
|
a) Eval()
|
b) Bind()
|
c) DataBind()
|
d) All of above
|
Which is a set of operations that
must either succeed or fail as a unit?
|
a)Triggers
|
b)Sql query
|
c) Transaction
|
d)function
|
What are the 2 methods of
DataAdapter, when the connection is open?
|
a)open connection
|
b)fill,update
|
c)fill,open
|
d)sql connection.open
|
If we are specifying windows
authentication in connection string what element we should add?
|
a)pool=false;
|
b)intial integrated=db1;
|
c)IntegratedSecurity=
true
|
d)None of the above
|
Which class can be used to implement
relationship on client side?
|
a)Dataset
|
b)DataRelation
|
c)DataAdpter
|
d)DataReader
|
Which object is used to point
location of database?
|
a) ConnectionSQlstring
|
b)ConnectionString
|
c)ConnectionParameter
|
d)Connection
|
No comments :
Post a Comment