26.02.2015 Views

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure :- 9.4 View of loaded Employee table<br />

Now from interview point of view definitely you are not going to say the whole source<br />

code which is given in book.<strong>Interview</strong>er expects only the broader answer of what are the<br />

steps needed to connect to SQL SERVER.For fundamental sake author has explained the<br />

whole source code.In short you have to explain the “LoadData” method in broader<br />

way.Following are the steps to connect to SQL SERVER :-<br />

√<br />

√<br />

First is import the namespace “System.Data.SqlClient”.<br />

Create a connection object as shown in “LoadData” method.<br />

With objConnection<br />

.ConnectionString = strConnectionString<br />

.Open()<br />

End With<br />

√<br />

Create the command object with the SQL.Also assign the created connection<br />

object to command object. and execute the reader.<br />

182<br />

* Any special acheivements in your life till now...tell your best project which you have done<br />

best in your career .

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!