SQL Server Performance

Learn SQL syntax in C# VS2005

Discussion in 'SQL Server 2005 General Developer Questions' started by avipenina, Jun 25, 2007.

  1. avipenina New Member

    Hi,

    i know how to write TSQL commands my question is do you know any
    good book or web site (prefer book)that i can learn how to write SQL commands in C# language???
    like how to connect to SQL Server how to query sql server in C# and so on...
  2. FrankKalis Moderator

    Check out the C# tutorials on the MSDN site for a starter. For books check out the book section here. I did a review of Murach's C# 2005, which I consider quite usable.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Contributing Editor, Writer & Forum Moderatorhttp://www.sql-server-performance.com
    Webmaster:http://www.insidesql.de
  3. avipenina New Member

    i've looked on those sites not much help for me i need real book.
    whether anybody know if there is a book that teach only the SQL syntax in C# ?
  4. MohammedU New Member

  5. Adriaan New Member

    My answer to the question "how to write SQL commands in C# language" would be - what's the point?

    Either you have a C# app that connects to a SQL database and executes a stored procedure - in which case you only need to know how to execute a stored procedure, - or you have a C# app that sets up an ADO connection that executes a T-SQL script - in which case the SQL script is a "foreign object" that has nothing to do with C# per se, and you just need to know T-SQL to know what the script should look like.

    But obviously my knowledge of C# is very limited.
  6. Madhivanan Moderator

  7. FrankKalis Moderator

    I'm really not sure what you mean by "SQL syntax in C#". The syntax of T-SQL is the same, regardless if you write some statements for a stored procedure or in embedded SQL in C#.

    If you're searching for information how to connect to and work with SQL Server from C#, check the book I've mentioned and to which Mohammed has given you the link. Otherwise you might be interested in getting a book about ADO.NET 2.0. There's a book by David Sceppa from MS Press that explains these topics using C#.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Contributing Editor, Writer & Forum Moderatorhttp://www.sql-server-performance.com
    Webmaster:http://www.insidesql.de
  8. satya Moderator

    I totally agree with Adriaan here, there is no point in re-inventing the wheel. Unless you wanted to learn a new programming language it is just a process that you need to find. For sure SQL 2005 onwards you can take help of LINQ or even ASSEMBLIES that were developed in .NET or C# etc.
  9. Adriaan New Member

    It's also an old thread, and a first post, promoting a blog ...
  10. FrankKalis Moderator

    [quote user="Adriaan"]It's also an old thread, and a first post, promoting a blog ...[/quote]
    True. Happened quite a few times here recently that such ancient threads were revived.

Share This Page