C# Exclusive Interview Questions and Answers (453) - Page 6

  • A joint initiative from DotNetFunda.Com and Questpond.
  • A one stop place on the internet to get trusted and proven Interview Questions (based on more than a decade of experience in this field) to ensure the success of the candidates.
  • You will find almost all Interview questions from Questpond here and this list is growing day by day with all latest and updated interview questions.

453 records found.

Get 650+ Questpond's Interview videos on discount

When should we use Oledb provider to SqlClient ?

If we need to communicate with MS sql server version 6.5 or earlier
" target="_blank">
Is the following Connection string correct?

NOTE: This is objective type question, Please click question title for correct answer.
What is the using statement?

The objects lifetime is controlled and that resources are cleaned up deterministically. The class which implements IDisposable should be used in the using statement.
what are the different constructors of command object?

SqlCommand(). SqlCommand(string cmdText) SqlCommand(string cmdText,SqlConnection constr) SqlCommand(string cmdText,SqlConnection con,SqlTransaction trans)
Which one of the following is preferred in fetching data from sqldatareader. dr[i] or dr.GetX(i) ?

GetX(i) is preferred because , we don't have to cast unlike dr[i] which returns an object and have to be casted.
Why is DataSet slower than DataReader?

As Dataset carry considerable overhead because of relations,multiple tables etc. speed is slower than "DataReader".Always try to use "DataReader" wherever possible, as it is meant especially for speed performance.
How can we specify port number in Connection String in App.Config file?

Connection String ="Server=.\sqlexpress,portnumber;Database=dbname;Uid=dbuser; Pwd=dbpassword" Here we can specify the port number which we want to use
@@Identity contains last identity value over given connection. Yes/No

Yes.Select@@Identity contains last identity value over given connectionand is different for every SqlConnection.
Can we have multiple .config files along with App.Config file???

We can have multiple .config files along with App.config file but we use only App.Config File.
The return type for ExecuteNonQuery() is ______________

NOTE: This is objective type question, Please click question title for correct answer.
The return type of ExecuteScalar() Method is _____________

The return type of Executescalar method is Object.
The Return Type of ExecuteReader() is ______________

The return type of ExecuteReader() is SqlDataReader.It is used for the execution of statements which return multiple rows and columns i.e., a set of records.
All Oledb Providers are __________ Components.

All Oledb Providers are COM components.

More C# Interview Questions & Answers here

Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Exclusive Interview Questions and Answers Categories