![]() |
|
|
|||||||
![]() |
MCSD - 70-320: More disagreements with Microsoft's Practice Exam |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 |
|
|
|
|
#2 |
|
Posts: n/a
|
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" <> wrote in message news: 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? > Craig Wimpenny |
|
|
|
#3 |
|
Posts: n/a
|
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); Andrew Shepherd |
|
|
|
#4 |
|
Posts: n/a
|
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! Craig Wimpenny |
|
|
|
#5 |
|
Posts: n/a
|
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 |
|
|
|
#6 |
|
Posts: n/a
|
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" <> wrote in message news: 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. > Craig Wimpenny |
|
|
|
#7 |
|
Posts: n/a
|
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). Andrew Shepherd |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Practice exam for 70-445??? | ChrisR | MCITP | 1 | 11-25-2008 01:33 AM |
| 70-536 Exam and Practice Exams | Matt | MCTS | 4 | 08-12-2007 08:40 PM |
| Any practice test suggestions for the A-plus O/S exam? | Dave | A+ Certification | 3 | 05-06-2005 11:43 AM |
| Re: Comptia Exam Pricing | CertCities | A+ Certification | 0 | 10-21-2003 11:03 PM |
| Re: Server+ exam afterthoughts | Rick Blythin | A+ Certification | 1 | 07-31-2003 10:54 PM |