none
SqlHelper Obsolete?

    Domanda

  • Hi

    I'm a newbie here so sorry if I've posted to the wrong group, I'm also a newbie to Application Blocks and have just downloaded them (at least the Enterprise Libraru June2005 which is supposed to contain all the MAB's).

    Anyhow, it appears that SqlHelper is not in the Enterprise Library. There is something called SqlCommandWrapper which appears to do the same thing plus much more.

    So, my question is : Is SqlHelper obsolete or is it a junior version of SqlCommandWrapper which will still be maintained?

     

    Thanks muchly

    Chris

    giovedì 2 marzo 2006 01:35

Risposte

  • Hey Chris,

    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.

    Things have changed a bit because the DAAB in Enterprise Library 1.0 and 2.0 are not just for SQL Server.  Theoretically, if you stick with stored procedures, you can, for example, create database agnostic code that can target both SQL Server and Oracle.

    You will probably find that you can use other application blocks in Enterprise Library as well, such as the logging application block, caching block, cryptography block, etc.

    I use Enterprise Library quite a bit.  The new version, 2.0, which is targeted for the .NET 2.0 framework is excellent.  The 1.0 version, targeted for the .NET 1.1 framework , is good, too, but not quite as cool as the new version.

    I have written a number of articles on Enterprise Library 2.0 which you can view here if you are interested:

    http://davidhayden.com/blog/dave/category/50.aspx?Show=All

     

    Enterprise Library 2.0 has its own forum if you have questions about it.  The forum is on GDN:

    http://www.gotdotnet.com/codegallery/messageboard/messageboards.aspx?id=295a464a-6072-4e25-94e2-91be63527327

     

    Regards,

    Dave

     

     

    venerdì 3 marzo 2006 02:50

Tutte le risposte

  • Hey Chris,

    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.

    Things have changed a bit because the DAAB in Enterprise Library 1.0 and 2.0 are not just for SQL Server.  Theoretically, if you stick with stored procedures, you can, for example, create database agnostic code that can target both SQL Server and Oracle.

    You will probably find that you can use other application blocks in Enterprise Library as well, such as the logging application block, caching block, cryptography block, etc.

    I use Enterprise Library quite a bit.  The new version, 2.0, which is targeted for the .NET 2.0 framework is excellent.  The 1.0 version, targeted for the .NET 1.1 framework , is good, too, but not quite as cool as the new version.

    I have written a number of articles on Enterprise Library 2.0 which you can view here if you are interested:

    http://davidhayden.com/blog/dave/category/50.aspx?Show=All

     

    Enterprise Library 2.0 has its own forum if you have questions about it.  The forum is on GDN:

    http://www.gotdotnet.com/codegallery/messageboard/messageboards.aspx?id=295a464a-6072-4e25-94e2-91be63527327

     

    Regards,

    Dave

     

     

    venerdì 3 marzo 2006 02:50
  • Thanks Dave

    That was really helpful. I was suspicious that I might have been wasting my time if I was targeting SqlHelper but I couldn't find any documentation at all that said 'SqlHelper is obsolete'

    Thanks again

    Chris

    venerdì 3 marzo 2006 03:17
  • So can you add the 1.1 Version of the Microsoft Application Blocks to a 2.0 project?  I really like using SqlHelper.
    lunedì 12 giugno 2006 01:51
  • Thanks.  I'm looking at existing code with SqlHelper in it, and was wondering why the only mentions of SqlHelper in help or MSDN are in forums.  No "SqlHelper class" official docs.   VS 2005 shows recognition when hovering the mouse, but I'd like the documentation on what it is and how to use it...

    martedì 9 dicembre 2008 20:16