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...
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
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# ?
http://www.amazon.com/Murachs-C-200...74375/ref=pd_bxgy_b_img_b/105-3252739-0866820 Murach's C# 2005 (Paperback) And also take a look.. http://www.c-sharpcorner.com/ MohammedU. Moderator SQL-Server-Performance.com All postings are provided “AS IS†with no warranties for accuracy.
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.
Learn SQL http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp Madhivanan Failing to plan is Planning to fail
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
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.
[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.