Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   MCSD (http://www.velocityreviews.com/forums/f26-mcsd.html)
-   -   70-320: More disagreements with Microsoft's Practice Exam (http://www.velocityreviews.com/forums/t45169-70-320-more-disagreements-with-microsofts-practice-exam.html)

Andrew Shepherd 04-18-2005 07:28 AM

70-320: More disagreements with Microsoft's Practice Exam
 
I'm having concerns over the test exam that comes with the MS boxed set
of books.

There's one thing it gets wrong in a number of places - if you are
using an SqlDataAdapter, and you've initialised it to point to a
connection, you DON'T have to open the connection. The SqlDataAdapter
opens it for you.

Here's an example question:
///////////////////////////////////////////////////////////////
Q: You created an XML Web service application that populates a dataset,
MyDataSet, with data from a SQL Server database. To populate MyDataSet,
you need to create SqlConnection and SqlCommand objects. The SQL query
that the SqlCommand object executes is stored in a string variable
named SqlStatement. Which of the following code snippets enables you to
populate MyDataSet successfully? (Choose one correct option.)

One Option that compiles and runs fine when I tested it via DevStudio:
///////////////////////////////////////////////////////////
DataSet MyDataSet = new DataSet();
SqlConnection myConnection = new SqlConnection("data
source=localhost; initial catalog=Northwind");
string SqlStatement;
SqlStatement="Select * from Products";
SqlCommand myCommand = new SqlCommand();
myCommand.CommandText=SqlStatment;
myCommand.Connection = myConnection;
SqlDataAdapter myAdapter = new SqlDataAdapter();
myAdapter.SelectCommand = myCommand;
myAdapter.Fill(MyDataSet);


But if you select the answer the test says "Incorrect. You must open
the connection first".


Now, I know that you don't need to open the connection. And the MSDN
knows it and the ADO.NET implementation knows it. But the materials
provided BY THE SAME COMPANY THAT PRODUCES THE TEST gets it wrong.

So, if I see this question in the test, should I disable my actual
knowledge and think incorrectly? Or can I be assured that Microsoft's
quality control on the actual tests is a lot better than their QA on
their study materials?


Craig Wimpenny 04-18-2005 03:46 PM

Re: 70-320: More disagreements with Microsoft's Practice Exam
 
Hi Andrew,

If that is the exact question then look closely at the connection string...
there is no user ID/password or integrated security=SSPI added that I can
see. In which case, I believe the result would be that the data adapter
would not be able to connect to the database. Did you build your test
application using Data Connections in Server Explorer? If so, that would
ensure that your connection string was ok and so it would work in that
case... but that's not actually an apples to apples comparison.

That's the only thing I can see but I'm not an expert so don't take what I
said as the final word. Any ADO .NET experts?

"Andrew Shepherd" <shepherd_a@hotmail.com> wrote in message
news:1113809316.062447.271140@f14g2000cwb.googlegr oups.com...
> I'm having concerns over the test exam that comes with the MS boxed set
> of books.
>
> There's one thing it gets wrong in a number of places - if you are
> using an SqlDataAdapter, and you've initialised it to point to a
> connection, you DON'T have to open the connection. The SqlDataAdapter
> opens it for you.
>
> Here's an example question:
> ///////////////////////////////////////////////////////////////
> Q: You created an XML Web service application that populates a dataset,
> MyDataSet, with data from a SQL Server database. To populate MyDataSet,
> you need to create SqlConnection and SqlCommand objects. The SQL query
> that the SqlCommand object executes is stored in a string variable
> named SqlStatement. Which of the following code snippets enables you to
> populate MyDataSet successfully? (Choose one correct option.)
>
> One Option that compiles and runs fine when I tested it via DevStudio:
> ///////////////////////////////////////////////////////////
> DataSet MyDataSet = new DataSet();
> SqlConnection myConnection = new SqlConnection("data
> source=localhost; initial catalog=Northwind");
> string SqlStatement;
> SqlStatement="Select * from Products";
> SqlCommand myCommand = new SqlCommand();
> myCommand.CommandText=SqlStatment;
> myCommand.Connection = myConnection;
> SqlDataAdapter myAdapter = new SqlDataAdapter();
> myAdapter.SelectCommand = myCommand;
> myAdapter.Fill(MyDataSet);
>
>
> But if you select the answer the test says "Incorrect. You must open
> the connection first".
>
>
> Now, I know that you don't need to open the connection. And the MSDN
> knows it and the ADO.NET implementation knows it. But the materials
> provided BY THE SAME COMPANY THAT PRODUCES THE TEST gets it wrong.
>
> So, if I see this question in the test, should I disable my actual
> knowledge and think incorrectly? Or can I be assured that Microsoft's
> quality control on the actual tests is a lot better than their QA on
> their study materials?
>




Andrew Shepherd 04-18-2005 09:13 PM

Re: 70-320: More disagreements with Microsoft's Practice Exam
 
You may be right on the string. When I tested it via DevStudio, that is
the one thing I had to change. I just figured that in the example the
database was configured so it wouldn't need security, or something.

The answer that the exam marks as "correct" uses an identical
connection string. The only difference with this answer and the
"incorrect" answer is that the "correct" answer opens the connection
explicitly:

//////////////////////////////////////////////////////
DataSet MyDataSet = new DataSet();
SqlConnection myConnection = new SqlConnection("data
source=localhost; initial catalog=Northwind");
myConnection.Open();
string SqlStatement;
SqlStatement="Select * from Products";
SqlCommand myCommand=new SqlCommand();
myCommand.CommandText=SqlStatement;
myCommand.Connection=myConnection;
SqlDataAdapter myAdapter = new SqlDataAdapter();
myAdapter.SelectCommand=myCommand;
myAdapter.Fill(MyDataSet);


Craig Wimpenny 04-19-2005 12:53 AM

Re: 70-320: More disagreements with Microsoft's Practice Exam
 
Odd. If the connection string is the same in both answers then I would have
come to the same conclusion that you did... that there's an error in that
test question. Have you checked to see if there are errata for that book at
MS Press? Regardless, I think your best bet would be to go with what you
know to be true but I do get the impression that some of the questions might
try to trip you up with such details if sample questions from some of the
test preparation books are any indication.

Good luck!



Andrew Shepherd 04-20-2005 01:08 AM

Re: 70-320: More disagreements with Microsoft's Practice Exam
 
I passed the 70-320 exam today with a score of 936. (Which I have to
say I'm pretty damned happy about)

In answer to the question I posted:

I had found even more instances where the practice test was completely
wrong. Near identical questions were in the actual exam, and I had to
choose between what I new to be correct or what the practice test
asserted was correct.
I went with what I knew was the correct answer.

Based upon the sections that I scored 100% in, that turned out to be
the right thing to do.

So the practice test that comes with the MCAD/MCSD Self-Paced Training
Kit can not be trusted as an instructional tool. An irony of this is
that by having to double-check the answers I ended up with a much
better overall knowledge then if it had all been correct in the first
place.


Craig Wimpenny 04-20-2005 01:53 PM

Re: 70-320: More disagreements with Microsoft's Practice Exam
 
Congratulations! And thanks for the heads up on study material questions
and actual test ambiguities. Did you get any questions where more than one
answer was correct but done slightly differently as in your previous example
(even though it wasn't intended to have more than one correct answer in the
study guide) or did they always want the most efficient answer (which I
suppose would probably only be fewer source lines in your original example)?

I guess I'm asking if any of the questions seemed kind of sneaky and tried
to trip you up with what you considered minutia.

Thanks again for letting us know.

"Andrew Shepherd" <shepherd_a@hotmail.com> wrote in message
news:1113959317.032581.56270@o13g2000cwo.googlegro ups.com...
>I passed the 70-320 exam today with a score of 936. (Which I have to
> say I'm pretty damned happy about)
>
> In answer to the question I posted:
>
> I had found even more instances where the practice test was completely
> wrong. Near identical questions were in the actual exam, and I had to
> choose between what I new to be correct or what the practice test
> asserted was correct.
> I went with what I knew was the correct answer.
>
> Based upon the sections that I scored 100% in, that turned out to be
> the right thing to do.
>
> So the practice test that comes with the MCAD/MCSD Self-Paced Training
> Kit can not be trusted as an instructional tool. An irony of this is
> that by having to double-check the answers I ended up with a much
> better overall knowledge then if it had all been correct in the first
> place.
>




Andrew Shepherd 04-21-2005 10:52 AM

Re: 70-320: More disagreements with Microsoft's Practice Exam
 
The exam questions was of a much higher quality then the practice test.
There weren't any ambiguous questions, where it could have been more
than one answer. In the questions where I knew the material, I was able
to discount all but one of the available answers.

There was another dodgy class of questions on the practice test, where
it went down to knowledge of the syntax. For example, one practice
question had two near identical answers that looked correct but one had
the line

SqlCommand cmd = new SqlCommand(queryString, connection);

and the other had

SqlCommand cmd = new SqlCommand(connection, queryString);

This is not really testing understanding of .NET or programming, it's
testing syntax that real-life developers never take the time to
remember because it's so quick and easy to look up. Thankfully, I
didn't encounter questions like that on the actual test either.

(That's not to say there aren't any, they just weren't in the 43 I got).



All times are GMT. The time now is 11:40 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.