From: Erland Sommarskog on
Michael C (mike(a)nospam.com) writes:
> Sounds reasonable. In the *extremely* rare case I need to store such huge
> strings then I expect to send the results to disk. If this is the reason
> sqlserver has these 8k limits then that seams even sillier than I first
> thought. A feature than it is very rarely used seams to be limiting the
> other 99% of cases.

Sure, this example is not very practical. But 1 MB string for an image
is nothing unreasonable. Then imagine 1000 users doing it at the same time.
This is what you fail to realise: SQL Server is a server application, which
should be able to serve thousands of simultaneous users at the same time.
C# as such is not defined to be a server, so it can afford to give users a
simplistic model, and then crash when it hits the ceiling.

> I still do. The only difference is they reduced the limit where it crashes
> to a 1980s era figure of 8k.

It doesn't crash. Yes, you get an execution error (or truncation), but the
entirely application does not stop.

> No, of course not, you have to tell it what to convert it to. This was
> exactly what I did in the code sample I provided. You did read the code I
> posted? :-)

It didn't tell me much. I asked for working code, not for some theories.

> Actually, it's up to you to prove it is not possible. You are the one who
> raised this point from second hand information of which you're not really
> sure about.

Eh, my source is a fellow SQL Server MVP with strong knowledge in .Net. And
I asked the question in our internal MVP forum, so I expect that if his
answer was wrong, someone would have corrected him.

> As far as I am concerned this is possible from linq and I will not
> discuss this any further until you've actually attempted it and can
> provide something a little more substantial.

How would I be able attempt something before you have posted any code?
Keep in mind that I'm an SQL programmer that only occasionally writes C#
and never uses LINQ. But I know how to pass a TVP to SqlClient - and I
can't see how LINQ out of thin air set all parameter properties correctly.

So the burden of proof lies on you.

--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
From: Michael C on
"Erland Sommarskog" <esquel(a)sommarskog.se> wrote in message
news:Xns9CD561C0D19AFYazorman(a)127.0.0.1...
> How would I be able attempt something before you have posted any code?
> Keep in mind that I'm an SQL programmer that only occasionally writes C#
> and never uses LINQ. But I know how to pass a TVP to SqlClient - and I
> can't see how LINQ out of thin air set all parameter properties correctly.
>
> So the burden of proof lies on you.

Sorry, that is complete rubbish and as I said I am not going to discuss this
point further until you have some proof. What you have is basically about as
sketchy as it gets and you've just gone and admitted you have no proof. Do
your own work Erland, I am not your lacky.

Michael


From: Michael C on
"Erland Sommarskog" <esquel(a)sommarskog.se> wrote in message
news:Xns9CD561C0D19AFYazorman(a)127.0.0.1...
> Eh, my source is a fellow SQL Server MVP with strong knowledge in .Net.
> And
> I asked the question in our internal MVP forum, so I expect that if his
> answer was wrong, someone would have corrected him.

Interesting that it appears you've made quite an effort to prove what is a
*really* minor point and still don't have a answer. Now you're trying to get
the person you're trying to impress this point apon to help you. If your MVP
friend is so knowledgable why can't you get a straight answer out of him?
The funny thing is is that if he really did know C# that well then he'd know
how to do it (it really is trivial).

Michael


From: Erland Sommarskog on
Michael C (mike(a)nospam.com) writes:
> Interesting that it appears you've made quite an effort to prove what is
> a *really* minor point and still don't have a answer. Now you're trying
> to get the person you're trying to impress this point apon to help you.
> If your MVP friend is so knowledgable why can't you get a straight
> answer out of him? The funny thing is is that if he really did know C#
> that well then he'd know how to do it (it really is trivial).

I got a straight answer: no, it is not possible.

All you have been able to produce is that it works, but you have completely
refused to make any effort to prove it.

And furthermore, while I do not know LINQ, I know how to pass a TVP through
ADO .Net, and I know that there is no way that LINQ is able to do that
without someone coding for it.

As for it being a minor point, you complained that SQL Server had so
many limitations that would not happen i C#. I pointed out this limitation
in LINQ, which in my opinion is a considerable limitation. If now LINQ is
so fantastic, why does it not permit users to utilise the full power of
SQL Server?

Since you have not worked with TVPs and SQL 2008, you could have accepted
my word for it. Instead you insist on maintaining a position despite you
don't have the knowledge.


--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
From: Michael C on
"Erland Sommarskog" <esquel(a)sommarskog.se> wrote in message
news:Xns9CD65EAB57AAEYazorman(a)127.0.0.1...
> I got a straight answer: no, it is not possible.

You didn't get a straight answer because you have not been able to answer
my question as to whether it is straight linq or linq to sql. Basically you
don't know the most basic detail of this. Are you not in contact with this
person to ask them again?

> All you have been able to produce is that it works, but you have
> completely
> refused to make any effort to prove it.

No, I have provided sample code. Did you try my sample code and prove it
does not work?

> And furthermore, while I do not know LINQ, I know how to pass a TVP
> through
> ADO .Net, and I know that there is no way that LINQ is able to do that
> without someone coding for it.

So you're saying that it is possible? Of course you need to do some coding
for it.

> As for it being a minor point, you complained that SQL Server had so
> many limitations that would not happen i C#. I pointed out this limitation
> in LINQ, which in my opinion is a considerable limitation. If now LINQ is
> so fantastic, why does it not permit users to utilise the full power of
> SQL Server?

Even though linq does do this, *if* the limitation did exist it is not silly
like many of the limitations in sqlserver. C# does have limitations but they
are not as silly as those in sqlserver. Don't you think an 8k limit is the
most rediculous thing you've every heard of in 2005? C# just doesn't have
limitations that silly. My point was never that C# didn't have limitations,
just that they weren't as silly as those in sqlserver.

> Since you have not worked with TVPs and SQL 2008, you could have accepted
> my word for it. Instead you insist on maintaining a position despite you
> don't have the knowledge.

Because it's fairly clear you don't really know the full details of this and
you've basically admitted it does work with your "without coding for it"
statement. Of course you have to write code for it and of course I'm going
to question you on it.

Michael


First  |  Prev  |  Next  |  Last
Pages: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Prev: Sql Server on VMWare
Next: AdventureWorks database