Answer Posted / manish t
the command in the above code uses cmd.executereader ()
which means an datareader object is returned as a result of
the execution .....which essentially means one datar reader
object getting assigned to another datareader object
dr = cmd.executereader
so it is simply assigning of objects and does not require
new keyword as the datareader inside the execute reader has
already allocated space and it is just assigning it to a
different object ...this is true with executedataset as
well ...remember the rule is that corret type should be
returned. it is same in case of any objects ..try creating
an object A with new keyword and another object B of same
type without new key word ...and then assign the A to B and
you will find that By ref all properties are avialable to b
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
How to add a check box or a dropdown list to a column in a datagrid?
What is ado.net explain with diagram?
can we create synonymn in ms access,sql server,my sql if so explain me with example
What are the core objects of ADO.NET?
What are the various methods provided by the DataSet object to generate XML?
What are the essential features of ado.net?
What is ado and dao?
what is the difference betwen typed dataset and untyped dataset?in general which dataset can we use in programming?
Why ca not we use multiple inheritance and garbage collector paralelly in .net?
How we can provide data to ado.net?
How to add an aggregate column?
What are the namespaces used in ado.net for data access?
What you mean by filtering of data?
Explain the overview of ado.net architecture?
If a table contains 20000 records . In a page at each time 100 records to be displayed what are the steps you will take to improve performance? Will you use dataset or datareader?