May 1, 2012 at 11:37 pm
Nice question, thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
May 2, 2012 at 1:29 am
reema.m
A DataSet will be serialized only into xml irrespective of the formatter which is used.
It was true only for .NET 1.x.
In .NET 2.0 (introduced in 2005 – seven years ago!) and later, the serialization format for a DataSet can be chosen.
http://msdn.microsoft.com/en-us/library/system.data.serializationformat.aspx:
SerializationFormat Enumeration
RemarksMicrosoft ADO.NET 2.0 introduces the ability to serialize a Dataset as binary content. Earlier versions of the Microsoft .NET Framework do not support binary serialization.
The default format is Xml. This is backward compatible and will work with all versions of the .NET Framework.
May 2, 2012 at 1:41 am
vk-kirov (5/2/2012)
reema.m
A DataSet will be serialized only into xml irrespective of the formatter which is used.It was true only for .NET 1.x.
Yup. The reference givenn in the answer points to documentation that applies to .Net 1.1.
May 2, 2012 at 2:03 am
Sadly, I felt I had to report this question and explanation to Steve. The explanation is not the straight copy&paste from another source we had last week, but it is a copy and paste from two sources, with intervening sentences left out.
http://stackoverflow.com/questions/8113925/dataset-datatable-is-a-value-type-or-reference-type - first answer.
http://geekswithblogs.net/jith/archive/2007/04/02/110553.aspx - first paragraph.
I'll let Steve decide if this is fair use or not. I'mglad I don't have to make that call.
May 2, 2012 at 3:01 am
I didn't like this much. It's nice to see a question on parameter passing in the CLR languages, but it's not nice when the question is not worded in such a way as to leave no clue that that is what it is about.
It's about guessing which object in which language the author is talking about not about anything real. Data Set (with the space) could mean table parameter in T-SQL (in which case the correct answer is "value", there's no way of passing this by reference) or it could mean "object of the CLR DataSet (no space) class" in which case the correct answer is "reference" (because there's no way of passing this by value).
If it had used "DataSet" instead of "Data Set" it would have been unambiguous. Maybe if it had had a title other than the utterly meaningless "General" the title could have resolved the ambiguity. As it was, my take was that the "General" question about a "Data Set" was probably about T-SQL rather than about VB, C#, or JavaScript, so of course I selected the wrong answer. Also, it's sloppily worded - you have to realise that where the question has "object" it actually means "parameter" before the question means anything at all.
I didn't much like the explanation either. The sloppy wording continues: presumably "they" in the first sentence refers to "parameters", which have nowhere been mentioned (neither in the question nor in the explanation). Also I find it quite surprising to see a reference to a URL containing "(v=vs71)" in the year 2012 - mainstream support ended four and a half years ago. Either "(v=vs100)" or "(v=vs110)" would have been more suitable. Even "(v=vs90)" (not to mention 80 or 85) would have seemed somewhat dated today!
Tom
May 2, 2012 at 3:07 am
L' Eomot Inversé (5/2/2012)
I didn't like this much. It's nice to see a question on parameter passing in the CLR languages, but it's not nice when the question is not worded in such a way as to leave no clue that that is what it is about.It's about guessing which object in which language the author is talking about not about anything real. Data Set (with the space) could mean table parameter in T-SQL (in which case the correct answer is "value", there's no way of passing this by reference) or it could mean "object of the CLR DataSet (no space) class" in which case the correct answer is "reference" (because there's no way of passing this by value).
If it had used "DataSet" instead of "Data Set" it would have been unambiguous. Maybe if it had had a title other than the utterly meaningless "General" the title could have resolved the ambiguity. As it was, my take was that the "General" question about a "Data Set" was probably about T-SQL rather than about VB, C#, or JavaScript, so of course I selected the wrong answer. Also, it's sloppily worded - you have to realise that where the question has "object" it actually means "parameter" before the question means anything at all.
I didn't much like the explanation either. The sloppy wording continues: presumably "they" in the first sentence refers to "parameters", which have nowhere been mentioned (neither in the question nor in the explanation). Also I find it quite surprising to see a reference to a URL containing "(v=vs71)" in the year 2012 - mainstream support ended four and a half years ago. Either "(v=vs100)" or "(v=vs110)" would have been more suitable. Even "(v=vs90)" (not to mention 80 or 85) would have seemed somewhat dated today!
The catogory was .net, didn't you notice 😉 😀
Regarding the explanation, that's because it has been copy pasted of a forum, as Hugo has found out.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
May 2, 2012 at 3:27 am
Koen Verbeeck (5/2/2012)
The catogory was .net, didn't you notice 😉 😀Regarding the explanation, that's because it has been copy pasted of a forum, as Hugo has found out.
The category isn't visible on teh QoTD page unless you scroll down to the "Questions from the Archive" list, so I didn't see it. I guess whether you see it or not depends on how big your browser window is.
But if I had see the .net category, I would have assumed it was about VB or C# or JavaScript, not about T-SQL, and then I might have disliked it less because it would not have been ambiguous.
Tom
May 2, 2012 at 4:07 am
Well I have to say I had no idea what was being asked. I didn't see any reference to a context. Maybe I should have looked harder.
...One of the symptoms of an approaching nervous breakdown is the belief that ones work is terribly important.... Bertrand Russell
May 2, 2012 at 4:16 am
I would agree a little context would be nice and that the spelling of 'Data Set' is a little confusing. As I am primarily a dev though it was trivial once I saw the possible answers - perhaps if I wasn't it would have been a bit more confusing.
May 2, 2012 at 5:30 am
I'll plead guilty to being clueless about the context as well. Already twice as many misses in May as in April! 🙁
Still, perhaps a little more care (and original effort?) could have put into the question/answer/explanation.
[font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
Connect to me on LinkedIn
May 2, 2012 at 5:42 am
I liked this question, mostly because I felt I could answer it with a little confidence, and being a developer I immediately assumed the .NET context (even though I had not seen the .NET reference in the Archive List).
However, I do agree with Tom and Hugo in their points, it's not clear.
_____________________________________________________________________
[font="Comic Sans MS"]"The difficult tasks we do immediately, the impossible takes a little longer"[/font]
May 2, 2012 at 6:41 am
Nice and easy question, especially for .net programmers
May 2, 2012 at 7:56 am
L' Eomot Inversé (5/2/2012)
Data Set (with the space) could mean table parameter in T-SQL (in which case the correct answer is "value", there's no way of passing this by reference)
Isn't a table parameter passed by reference (even if you only specify the variable name) to a procedure?
I don't know how it's done behind the scenes in SQL Server, but I imagine that some kind of pointer is passed to the procedure, not the actual content of the table variable.
May 2, 2012 at 9:51 am
Nils Gustav Stråbø (5/2/2012)
L' Eomot Inversé (5/2/2012)
Data Set (with the space) could mean table parameter in T-SQL (in which case the correct answer is "value", there's no way of passing this by reference)Isn't a table parameter passed by reference (even if you only specify the variable name) to a procedure?
I don't know how it's done behind the scenes in SQL Server, but I imagine that some kind of pointer is passed to the procedure, not the actual content of the table variable.
You are right. If it were passed by value, SQLS would have to make a clone and pass that, and changes to the set in the procedure would be made only to the passed clone, not to the original set.
Which is not the case.
Viewing 15 posts - 1 through 15 (of 24 total)
You must be logged in to reply to this topic. Login to reply