SQLHelper Class

Hi Experts,
Do you know any SQL Helper Class (C#) free for use?
I find one one the web, but don't know whether it has licensing issue...
Who is Participating?
AlokJain0412Connect With a Mentor Commented:
Please check these links. They may be helpful for you.




if you have download it from microsoft site then there is option for code and dll.

Now you have downloaded the dll so sqlhelper.cs will not be available in app_code folder.

Sqllnjuction can be prevented if you most Stored-procedures.

If you want to use sqlhelper class function.

First you have to add namespace Microsoft.ApplicationBlocks.Data

After that you can use all its functions using SqlHelper.ExecuteNonQuery() like this.
Apart from that i would like to add my opinion
A lot of people still use the SqlHelper Class that was a part of the original Data Access Application Block, but if you are building new applications I recommend using the Data Access Application Block that is a part of Enterprise Library.

SqlHelper was actually replaced with an abstract class, called Database, and two concrete classes that derive from it:  SqlDatabase and OracleDatabase
bbkevinAuthor Commented:
Hi santhimurthyd and AlokJain0412,

I have a project which is a Web Site, not Web Application, therefore I have to put all the common code to App_Code folder.
Should I copy the code from http://www.sharpdeveloper.net/source/SqlHelper-Source-Code-cs.html and remove the namespace?
Do I need to reference dll / class?
I do not want to install the Enterprise Library in the production server..
santhimurthydConnect With a Mentor Commented:
No need for any third part dll reference, You may need to add reference to .Net Dll

As you request, Just repalce the namespace to your requirment, that's enough
bbkevinAuthor Commented:
Thanks experts,
I finally use dll in Microsoft Enterprise Library 3.1.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.