Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 Article Discussion
 Article: What will C# Look Like in SQL Server?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-14 : 21:48:29
Articles abound on the Internet about the .NET Common Language Runtime (CLR) being incorporated into the next version of SQL Server codenamed "Yukon". My assumption is that we'll be able to write stored procedures, user-defined functions and possibly database level classes in languages such as C#, Visual Basic.NET, Perl, Pyton, Ruby, J# (JScript?) and any other language that compiles to the Microsoft Intermediate Language (MSIL). What does this mean to you? This article is my rampant speculation about what this might look like.

Article Link.

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2002-04-14 : 21:52:12
Nice Graz....

Q) How do you fix TSQL Error handling (lack of)
A) Add another language!

The error handling will be my focus.. plus some statistical functions..

DavidM

Tomorrow is the same day as Today was the day before.
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-04-15 : 18:31:59
Graz,

Good speculation, thanks! I'm all in favor of better error-handling systems. This has been one of my biggest complaints against ASP too.

As for case-sensitivity, I sure hope they don't get carried away. It has become a pet peeve of mine. I have spent way too much time debugging ASP pages because there's some capitalization error in my client-side JavaScript. Most make sense, but who came up with isNaN anyway? Why should capitalization matter? It won't make any difference when we are fully voice-activated. I'm not going to sit here and say, "SELECT, with a capital S, all records from Authors"...

------------------------
GENERAL-ly speaking...
Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-04-15 : 20:42:55
quote:

Q) How do you fix TSQL Error handling (lack of)
A) Add another language!



I would assume if they really want parity between T-SQL and the .NET languages they'll have T-SQL compile into MSIL. That means they should be able to add cool new features to T-SQL very easily. There's no reason it couldn't have a try ... catch block also!

Case sensitivity is really my only complaint with C# so far. It's just like stepping back a decade. However since all variables are required to be defined the errors usually jump out at you pretty quick.



===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-04-16 : 02:31:54
Graz,

Just wondering why you don't like VB.Net? (You say you hope to never have to write VB again)

You can do everything in VB.Net that you can do with C# except write unsafe code blocks.

Plus it gets rid of the case sensitivity, and those pesky semicolons are not required.

-Chad

Go to Top of Page

Nazim
A custom title

1408 Posts

Posted - 2002-04-16 : 04:39:17
Chad, though i have been programming with VB for couple of years. with Coming of C# i too dont like using VB. somewhere it doesnt looks like a serious programming language like C or C#.

Am eagerly waiting for yukon too. am curious about how will it handle data process. will this kinda statments will be supported with C#(or will we be using T-sql

int variablename;
select variablename=count(*) from tablename where abc=33;

or
using System.TSql;

int variablename;
select variablename=count(*) from tablename where abc=33;


or

int variablename;
select variablename=count(*) from tablename where abc=33;






--------------------------------------------------------------
Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-04-16 : 09:14:43
quote:

Just wondering why you don't like VB.Net? (You say you hope to never have to write VB again)

You can do everything in VB.Net that you can do with C# except write unsafe code blocks.

Plus it gets rid of the case sensitivity, and those pesky semicolons are not required.



I probably should have said I hope never to write in VBScript again. I don't have a great answer to this one. My early .NET pages were all written in VB.NET. All of SQLTeam in written in VBScript. When I got back to those first pages in VB.NET they just feel "thick". That's about the best I can describe it. VB.NET is a more verbose language than C#. More keywords. Longer keywords. I just find personally I'm more comfortable with C#. That's something I was very suprised to find out.

I wanted to learn just enough so I could decide if I really could do everything in VB.NET that was possible in C#. And I ended up really liking C#. Who would've thought... :)

I'd really like to be able write a page like they did here: http://www.dotnetjunkies.com/quickstart/aspplus/. For each code snippet you can click for C#, VB or JScript without a server roundtrip. In the future we're going to be publishing articles in three languages (C#, VB.NET, T-SQL) and that looks like a slick way to do it.

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-04-16 : 16:24:47
Nazim,

With VB 6.0 your statements are true. But with VB.Net, VB is finally a real language. You can do Multithreading, you can use delagates, it is completely object oriented. You can do everything in VB.Net that you can do in C# but unsafe code, which you probably will rarely need to do anyway.

I don't care either way, I like both languages, I just don't think VB deserves the bad rap anymore. It used to, but not anymore. You can finally do basically everything the C programmer can do. But it kep it's look and feel, and it is still a great RAD tool.

-Chad



Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2002-04-16 : 18:06:48
quote:

You can do everything in VB.Net that you can do in C# but unsafe code, which you probably will rarely need to do anyway.



Unfortunately that is not true...

You can't do Operator Overloading in VB.NET
There (currently) is no support for XML documentation in VB.NET.

I have to say I am with Graz on this one.... less Keywords means less code! Although the case sensitivity is a pain I find it forces me to be more carefull.



DavidM

Tomorrow is the same day as Today was the day before.
Go to Top of Page

GreatInca
Posting Yak Master

102 Posts

Posted - 2002-04-16 : 20:29:13
Adding arrays would be very nice. It would not be complete without being able to pass arrays into and returning them out of stored procedures though. Multidimensional arrays would be nice but not essential. Adding manipulatability for long text datatypes and regular expressions would be quite nice.

C# rocks. I like it even more than PHP. My boss likes his vb though. He has a hacker style with a cold fusion background. How do you teach people to like C#?

Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2002-04-16 : 20:41:00
quote:

How do you teach people to like C#?



Remove VB.NET from your Visual Studio Install

DavidM

Tomorrow is the same day as Today was the day before.

Edited by - byrmol on 04/16/2002 20:41:26
Go to Top of Page

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2002-04-16 : 22:12:50
Gotta agree with the General on case-sensitivity. My wife hates it when I'm an anal-retentive nit-picker - but I can blame Javascript for that!

Bring on voice activation! "Friends, Romans, Countrymen - Lend me your ears" - want to see how my PC responds!

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-04-17 : 14:37:02
quote:
Bring on voice activation! "Friends, Romans, Countrymen - Lend me your ears" - want to see how my PC responds!



WARNING!! Shameless plug! Check out [url]http://www.conversay.com/[/url] I know the guy who started this business, and he is a genius in the area of voice technology. The Conversay Voice Surfer is pretty cool stuff. I'm not allowed to say much about future technology except... Think Dick Tracy. It's coming soon, and web-enabled!

And now, we return you to the original topic of this thread... .Net! I'd just like to add that, with enough time and practice, I bet I could write an unsafe code block in VB.Net, so it'll truly match up to C#.

------------------------
GENERAL-ly speaking...
Go to Top of Page

Onamuji
Aged Yak Warrior

504 Posts

Posted - 2002-04-17 : 14:48:07
i like cobol.net ...

Go to Top of Page

Onamuji
Aged Yak Warrior

504 Posts

Posted - 2002-04-17 : 14:48:51
that was a joke ... i think?

Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-04-17 : 15:43:15
quote:

that was a joke ... i think



Oh that it were! I have a client that had no interest in .NET until I mentioned that it supported COBOL. You should have seen his eyes light up! You'll notice I listed COBOL in my list of languages in the header of this document.

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

JustinBigelow
SQL Gigolo

1157 Posts

Posted - 2002-04-17 : 16:13:38
Cobol.Net is being developed by Fujitsu (my employer), I'll have to check around and see if I can get the skinny on it.

Justin

Go to Top of Page

Wilson
Starting Member

1 Post

Posted - 2002-04-22 : 16:34:38
I have to say I disagree with a few things. I don't want any flame wars, but quite a few posts on this thread are questionable (such as VB "is finally a real language", gee how I could argue for days) displaying an obvious inexperience in the field, or a brash self-centeredness on technology.

But mainly I have to disagree with the idea that C# within SQL Server implies a hybrid of languages. How could you possible call code like this C# Code?

if ( @var1 == 17 )
{
@var2 = 19;
@var3 = 23;
}

...is beyond me. This is a half-wit butchering of C#. I would hate to see a site such as SQLTeam causing a BUTCHERING of either C# or T-SQL in the favor of half-wit considerations, a site like this represents public opinion on enterprise class software (SQL Server) bear that in mind before you throw up some lousy ideas that could have an impact on our corporate software. Please.

Most of you that haven't coded an extended stored procedure might not have any clear perspective on how the CLR and .NET will fit within Yukon, and while I can see some simple changes occurring within T-SQL (to facilitate calling upon code within managed assemblies) I don't think the changes to t-sql will (or should) be anything invasive.. Nothing so different that what we currently have for xp's.

In this case you probably shouldn't be parlaying ideas like having a T-SQL like "sub-syntax" within C#, or that C# should be integrated as a hybrid in sql server's t-sql.

I think T-SQL needs to remain T-SQL, and will. And that .NET CLR hosting within Yukon will (and should) maintain the same perspective that xp's have for years.

Ok, you can all bark at me now...




Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2002-04-22 : 17:56:50
Wilson,

Nice points..but have you seen all the threads relating to this topic?

This is but a subset of a much larger commentary we have had.

Personally, I think the idea of non-set language that close to the DB engine is a bit strange. I am still waiting for a language that crosses app domains and final kills off SQL!



DavidM

Tomorrow is the same day as Today was the day before.
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-04-22 : 18:04:27
Wilson,

What, DO you disagree with my assesment of VB.Net?

Please explain.

-Chad

Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2002-04-22 : 19:14:39
Wilson,

Regarding

quote:
In this case you probably shouldn't be parlaying ideas like having a T-SQL like "sub-syntax" within C#, or that C# should be integrated as a hybrid in sql server's t-sql.


Microsoft stated that C# will have full parity with T-SQL as the scripting language. They didn't mention anything about extended stored procedures in the articles I've found (http://www.sqlteam.com/FilterTopics.asp?TopicID=127). If you've found other articles that say different things I'd love to see them.

I think MS is far enough along in their planning and development that they probably aren't reading SQLTeam for ideas :) Although they do monitor sqlwish@microsoft.com if you do come up with a great idea. (Just in case someone is reading ... I'd really like it if BULK INSERT would take a variable for the filename).

I DID write this article to stimulate discussion. I'm curious what people think about this.

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page
    Next Page

- Advertisement -