<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Microsoft Application Blocks</title><link>http://forums.asp.net/122.aspx</link><description>Discuss the various Patterns &amp; Practices Application Blocks for ASP.NET 1.x.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: what is sqlhelper</title><link>http://forums.asp.net/thread/3342720.aspx</link><pubDate>Wed, 12 Aug 2009 05:04:52 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3342720</guid><dc:creator>reddi.sudarshan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3342720.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=3342720</wfw:commentRss><description>&lt;h2&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;SQL Helper ClassI&lt;/span&gt;&lt;/h2&gt;
&lt;h2&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;ntroduction:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&amp;nbsp;&amp;nbsp; Microsoft .net framework consists of ADO .NET which enables the developer to interact with the database. ADO .NET provides many rich features that can be used to retrieve and display data in a number of ways. Apart from the flexibility provided by the ADO .NET, sometimes we find ourselves repeating the same code again and again. Consider that at some point in our application we need to pass some parameters and retrieve some information from the database. We can perform this task by writing 5-6 lines of code which is cool. But when later we need to pass the parameters we have to write those 5-6 lines again which is not cool.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&amp;nbsp;&amp;nbsp; For this reason Microsoft introduced Data Access Application Block which can be used to perform common task in with less code. Another good reason to use the Microsoft .net data access application block is that it makes the application consistent meaning that if different companies are using the Data Access Block than you will find the code more easier to understand. You can download Microsoft .net Data Access Application Block from &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/daab.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/daab.asp&lt;/a&gt;. Download the application Block and simple install it. Lets see how we can use it.&lt;/span&gt; &lt;/p&gt;
&lt;h2&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;Using Microsoft .net Data Access Application Block:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;In this article I have used Microsoft .NET Data Access Application Block Version 2.0. Once you download and installed the application block you need to refer it in your application. For this first you need to create the .&lt;a id="KonaLink1" style="POSITION:static;" href="http://www.codersource.net/microsoft_data_access_application_block_azam.html" target="_top"&gt;&lt;span class="" style="FONT-WEIGHT:400;FONT-SIZE:x-small;COLOR:#0000ff;FONT-FAMILY:;POSITION:static;"&gt;&lt;span style="FONT-WEIGHT:400;FONT-FAMILY:Arial;POSITION:relative;"&gt;dll &lt;/span&gt;&lt;span style="FONT-WEIGHT:400;FONT-FAMILY:Arial;POSITION:relative;"&gt;file&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; for the Microsoft .net Data Access Application Block project. You can simple add the Data Access Application Block project in your current project and build the solution (This can also be performed using the command line tools). Once the solution is build the .dll file is created under the bin &lt;a id="KonaLink2" style="POSITION:static;" href="http://www.codersource.net/microsoft_data_access_application_block_azam.html" target="_top"&gt;&lt;span class="" style="FONT-WEIGHT:400;FONT-SIZE:x-small;COLOR:#0000ff;FONT-FAMILY:;POSITION:static;"&gt;&lt;span style="FONT-WEIGHT:400;FONT-FAMILY:Arial;POSITION:relative;"&gt;directory&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;. Delete the Data Access Project from your current project as you only needed it to create the .dll. And now add a reference in your project which will refer to Microsoft.ApplicationBlock.Data. Once you have made the reference you are ready to use the Application Block in your project.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div align="center"&gt;
&lt;p&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;Accessing data without Data Access Application Block:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;Lets first see how we can access data without using the Application Block so , that we can compare the flexibility of both the approaches. Below is a simple example that inserts two parameters into the database. You can note that as the number of parameters increases the lines of code also increases.&lt;/span&gt; &lt;/p&gt;
&lt;table class="mceItemTable"&gt;

&lt;tr&gt;
&lt;td&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;string connectionString = (string) &lt;br /&gt;ConfigurationSettings.AppSettings[&amp;quot;ConnectionString&amp;quot;]; &lt;br /&gt;SqlConnection connection = new SqlConnection(connectionString);&lt;br /&gt;SqlCommand command = new SqlCommand(&amp;quot;INSERT_PERSON&amp;quot;,connection);&lt;br /&gt;command.CommandType = CommandType.StoredProcedure;&lt;br /&gt;command.Parameters.Add(new SqlParameter(&amp;quot;@Name&amp;quot;,SqlDbType.NVarChar,50));&lt;br /&gt;command.Parameters[&amp;quot;@Name&amp;quot;].Value = txtName.Text;&lt;br /&gt;command.Parameters.Add(new SqlParameter(&amp;quot;@Age&amp;quot;,SqlDbType.NVarChar,10));&lt;br /&gt;command.Parameters[&amp;quot;@Age&amp;quot;].Value = txtAge.Text;&lt;br /&gt;connection.Open();&lt;br /&gt;command.ExecuteNonQuery();&lt;br /&gt;connection.Close();&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&amp;nbsp; As you can see that we had to write a lot of code to insert the parameters into the database. Now suppose that you have 10 parameters instead of two it would take you 1 hour to write a simple Insert module. Lets see how you can accomplish this using the Microsoft .net Data Access Application Block.&lt;/span&gt; &lt;/p&gt;
&lt;table class="mceItemTable"&gt;

&lt;tr&gt;
&lt;td&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;using Microsoft.ApplicationBlocks.Data; &lt;br /&gt;SqlHelper.ExecuteNonQuery(connection,&amp;quot;INSERT_PERSON&amp;quot;,new &lt;br /&gt;SqlParameter(&amp;quot;@Name&amp;quot;,txtName.Text) ,new SqlParameter(&amp;quot;@Age&amp;quot;,txtAge.Text) );&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&amp;nbsp;&amp;nbsp; As you see in the above code we perform the whole operation in a single line instead of writing 5-6 lines. First of all you should always add the namespace &lt;i&gt;Microsoft.ApplicationBlocks.Data&lt;/i&gt; without using the namespace you will not be able to use the Application Block. The next interesting thing that you might note is the &lt;i&gt;&lt;b&gt;SqlHelper&lt;/b&gt;&lt;/i&gt; class. The SqlHelper class is developed by Microsoft developers which contains the static methods to access the database. You can view the SqlHelper class by opening it in any word editor.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&amp;nbsp;&amp;nbsp; Lets see some more features of the Microsoft Data Access Application Block.&lt;/span&gt; &lt;/p&gt;
&lt;h2&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;Retrieving Multiple Rows using SqlDataReader and Data Access Application Block:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&amp;nbsp;&amp;nbsp; Consider a situation that you need to retrieve multiple rows from the database. This retrieval can be for only displaying purposes and you want this task to be completed very fast. Since you only need to display the rows and you need it very fast your best bet is to use SqlDataReader since its a forward only reader. Lets see how you can use SqlDataReader to get the rows you wanted in an efficient and quick manner.&lt;/span&gt; &lt;/p&gt;
&lt;table class="mceItemTable"&gt;

&lt;tr&gt;
&lt;td&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;using Microsoft.ApplicationBlocks.Data; &lt;br /&gt;SqlDataReader dr = SqlHelper.ExecuteReader(connection,CommandType.StoredProcedure,&amp;quot;SELECT_PERSON&amp;quot;); &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;STORED PROCEDURE SELECT_PERSON:&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;SELECT * FROM tblPerson;&lt;/span&gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&amp;nbsp;&amp;nbsp; As you can see executing the reader is pretty simple. All you have to do is pass few parameters and that&amp;#39;s it and it will return the datareader object which you can use to bind to the datagrid. Also remember that Execute Reader method of the SqlHelper class has several overloads which you can use according to your needs. You can pass parameters or simple execute a simple procedure like I did.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;I have also shown the stored procedure which simple selects all the rows from the tblPerson and returns them.&lt;/span&gt; &lt;/p&gt;
&lt;h2&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;Retrieving Multiple Rows using DataSet:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&amp;nbsp;&amp;nbsp; You can also use a dataset to retrieve multiple rows. The question that comes to your mind right now should be that when should you use DataReader and when you should use DataSet. You should use DataReader when your sole purpose is to display the data to the end user. Since datareader is a forward only reader its very fast in reading the &lt;a id="KonaLink3" style="POSITION:static;" href="http://www.codersource.net/microsoft_data_access_application_block_azam.html" target="_top"&gt;&lt;span class="" style="FONT-WEIGHT:400;FONT-SIZE:x-small;COLOR:#0000ff;FONT-FAMILY:;POSITION:static;"&gt;&lt;span style="FONT-WEIGHT:400;FONT-FAMILY:Arial;POSITION:relative;"&gt;records&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;. SqlDataAdapter also uses SqlDataReader when reading records from the database.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;If on the other hand you want are in a distributed environment and want your data to travel between different layers than using a DataSet will be a better choice.&lt;/span&gt; &lt;/p&gt;
&lt;table class="mceItemTable"&gt;

&lt;tr&gt;
&lt;td&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;// Selects all the rows from the database &lt;br /&gt;DataSet ds = SqlHelper.ExecuteDataset(connection,CommandType.StoredProcedure,&amp;quot;SELECT_DATA&amp;quot;); &lt;br /&gt;// Sends the parameters and returns the dataset &lt;br /&gt;DataSet ds = SqlHelper.ExecuteDataset(connection,CommandType.StoredProcedure,new SqlParameter(&amp;quot;@Name&amp;quot;,txtName.Text), new SqlParameter(&amp;quot;@Age&amp;quot;,txtAge.Text));&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;In the above code you can see that I showed two ways of using ExecuteDataSet method. The method has many overloads that you can use to satisfy your needs. The Execute DataSet method will be the most commonly used method you will use in your application.&lt;/span&gt; &lt;/p&gt;
&lt;h2&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;Retrieving a Single Row&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;Sometimes you have a need to retrieve a single row instead of group of rows. Whenever you need to retrieve a single row you will have to change your stored procedure. I am not saying that this is the only way to referring to a single row since you can retrieve all the rows into a dataset and than pick the row you like. I am talking about retrieving a single row from the database. Lets see what you need to do in your stored procedure to get one row out of it.&lt;/span&gt; &lt;/p&gt;
&lt;h3&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;Stored Proc:&lt;/span&gt;&lt;/h3&gt;
&lt;table class="mceItemTable"&gt;

&lt;tr&gt;
&lt;td&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;CREATE PROCEDURE getPersonDetails &lt;br /&gt;@PersonID int, &lt;br /&gt;@Name nvarchar(40) OUTPUT,&lt;br /&gt;@Age nvarchar(40) OUTPUT&lt;br /&gt;AS&lt;br /&gt;SELECT @Name = Name,&lt;br /&gt;@Age = Age&lt;br /&gt;FROM tblPerson&lt;br /&gt;WHERE PersonID = @PersonID&lt;/span&gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&amp;nbsp;&amp;nbsp; As you see in the stored procedure that we have marked the parameters with OUTPUT which means that when the execution of stored procedure is completed those parameters with OUTPUT &lt;a id="KonaLink4" style="POSITION:static;" href="http://www.codersource.net/microsoft_data_access_application_block_azam.html" target="_top"&gt;&lt;span class="" style="FONT-WEIGHT:400;FONT-SIZE:x-small;COLOR:#0000ff;FONT-FAMILY:;POSITION:static;"&gt;&lt;span style="FONT-WEIGHT:400;FONT-FAMILY:Arial;POSITION:relative;"&gt;keyword&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; will be returned to the caller. Lets now see the C# code of how we can use to retrieve a single row.&lt;/span&gt; &lt;/p&gt;
&lt;table class="mceItemTable"&gt;

&lt;tr&gt;
&lt;td&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;SqlParameter [] arParms = new SqlParameter[3];&lt;br /&gt;// @PersonID Input Parameter&lt;br /&gt;arParms[0] = new SqlParameter(&amp;quot;@PersonID&amp;quot;, SqlDbType.Int );&lt;br /&gt;arParms[0].Value = personID;&lt;br /&gt;// @ProductName Output Parameter&lt;br /&gt;arParms[1] = new SqlParameter(&amp;quot;@Name&amp;quot;, SqlDbType.NVarChar, 40);&lt;br /&gt;arParms[1].Direction = ParameterDirection.Output;&lt;br /&gt;// @UnitPrice Output Parameter&lt;br /&gt;arParms[2] = new SqlParameter(&amp;quot;@Age&amp;quot;, SqlDbType.NVarChar,40);&lt;br /&gt;arParms[2].Direction = ParameterDirection.Output;&lt;br /&gt;// Execute the stored procedure&lt;br /&gt;SqlHelper.ExecuteNonQuery( connectionString, CommandType.StoredProcedure, &amp;quot;getPersonDetails&amp;quot;, arParms);&lt;br /&gt;// create a string array of return values and assign values returned from stored procedure&lt;br /&gt;string [] arReturnParms = new string[2];&lt;br /&gt;arReturnParms[0] = arParms[1].Value.ToString();&lt;br /&gt;arReturnParms[1] = arParms[2].Value.ToString();&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;h2&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;Explanation of the code:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;1) First we made the array of type SqlParameters. The reason that we made the array is because we need to pass several parameters.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;2) Then we assign parameter whose index is &amp;#39;0&amp;#39; to the parameter that we like to send which, in this case is PersonID.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;3) We did not specify the direction of the Parameter. If the direction is not specified the parameter is considered to be an input parameter by default.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;4) Later we defined parameter Age which is on index &amp;#39;1&amp;#39; in the parameter array.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;5) This time we specified the parameter direction since we want the parameter value to be returned when the sql query completes.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;6) Next we use the ExecuteNonQuery method of the SqlHelper class to execute the query.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;7) Finally, we retrieved the values from the parameters. Values are retrieved since parameters are marked with direction output and also that in the stored procedure we have marked the variables as OUTPUT variables which will be returned to the caller program.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;You can perform the same operations in a number of ways. I like it this way since its more clear. As you can see you first created an array of Parameters. After the array is created you simply assigns the value and also informs the C# &lt;a id="KonaLink5" style="POSITION:static;" href="http://www.codersource.net/microsoft_data_access_application_block_azam.html" target="_top"&gt;&lt;span class="" style="FONT-WEIGHT:400;FONT-SIZE:x-small;COLOR:#0000ff;FONT-FAMILY:;POSITION:static;"&gt;&lt;span style="FONT-WEIGHT:400;FONT-FAMILY:Arial;POSITION:relative;"&gt;compiler&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; that which one of the parameters are OUTPUT.&lt;/span&gt; &lt;/p&gt;
&lt;h2&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;Retrieving&lt;/span&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt; XML Data:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;You can not only retrieve data from the database but also from any XML File. Lets see a small code sample which shows this operation.&lt;/span&gt; &lt;/p&gt;
&lt;table class="mceItemTable"&gt;

&lt;tr&gt;
&lt;td&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;SqlConnection conn = new SqlConnection(connectionString); conn.Open();&lt;br /&gt;// Call ExecuteXmlReader static method of SqlHelper class that returns an XmlReader&lt;br /&gt;// We pass in an open database connection object, command type, and command text&lt;br /&gt;XmlReader xreader = SqlHelper.ExecuteXmlReader(conn, CommandType.Text, &amp;quot;SELECT * FROM Products FOR XML AUTO&amp;quot; );&lt;br /&gt;return xreader;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;h2&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&lt;br /&gt;Explanation of the Code:&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;1) First we made the simple Sql Connection&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;2) The ExecuteXmlReader method is responsible for fetching the xml from the table. FOR XML is a keyword that is used to retrieve Xml fragments.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;3) And finally we returned the XML reader which is populated with the result that came from the ExecuteXmlReader method of the SqlHelper class.&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;I hope you enjoyed the Tutorial. Happyf Coding !------------Sudarshan Reddy&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;if any doubts ,plz revert back to this mail;&amp;nbsp; &lt;a href="mailto:reddi.sudarshan@gmail.com"&gt;reddi.sudarshan@gmail.com&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span class="" style="FONT-SIZE:x-small;FONT-FAMILY:Arial;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: what is sqlhelper</title><link>http://forums.asp.net/thread/2872917.aspx</link><pubDate>Sat, 17 Jan 2009 11:08:06 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2872917</guid><dc:creator>ram saurabh</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2872917.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=2872917</wfw:commentRss><description>&lt;p&gt;&lt;span&gt;The &lt;span class="SpellE"&gt;&lt;span style="mso-bidi-font-weight:bold;"&gt;SqlHelper&lt;/span&gt;&lt;/span&gt; class is a utility class that can be used to execute commands in a SQL&amp;nbsp;Server database.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: what is sqlhelper</title><link>http://forums.asp.net/thread/2084456.aspx</link><pubDate>Tue, 01 Jan 2008 08:59:50 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2084456</guid><dc:creator>ovaisgeo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2084456.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=2084456</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa480458.aspx#entlibjan2006_dataaccessappblock_design"&gt;http://msdn2.microsoft.com/en-us/library/aa480458.aspx#entlibjan2006_dataaccessappblock_design&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;i hope u get an idea by the msdn about DAAB&lt;/p&gt;
&lt;p&gt;Please Mark as &amp;quot;Answer&amp;quot;&lt;/p&gt;
&lt;p&gt;Muhammad Ovais&lt;br /&gt;Web Developer&lt;/p&gt;</description></item><item><title>Re: what is sqlhelper</title><link>http://forums.asp.net/thread/2084449.aspx</link><pubDate>Tue, 01 Jan 2008 08:45:52 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2084449</guid><dc:creator>ovaisgeo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2084449.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=2084449</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Microsoft has developed the DAAB (Data Access Application Block)&amp;nbsp;for Data access.which is usefull for access the methods or function.it is ready to use code for .net Application.&lt;/p&gt;
&lt;p&gt;Please Mark as &amp;quot;Answer&amp;quot;&lt;/p&gt;
&lt;p&gt;Muhammad Ovais&lt;br /&gt;Web Developer&lt;/p&gt;</description></item><item><title>Re: what is sqlhelper</title><link>http://forums.asp.net/thread/2077195.aspx</link><pubDate>Wed, 26 Dec 2007 08:52:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2077195</guid><dc:creator>alladi.sai</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2077195.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=2077195</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlHelper is a class which is used in dataaccess layer. Which contains a deffination of&amp;nbsp; ExecuteReader ,ExecuteNonQuery, ExecuteDataset ,Connection and so on.........&lt;/p&gt;
&lt;p&gt;ExecuteDataSet Returns Dataset ,ExecuteReader Returnns SlqDataReader and So on......&lt;/p&gt;
&lt;p&gt;we will create a object for this perticular class and we can use it in our application.Generally it comes with a microsoft Application Block.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;-----------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Please Mark as Answer if u find helpful.&lt;/p&gt;</description></item><item><title>Re: what is sqlhelper</title><link>http://forums.asp.net/thread/2077184.aspx</link><pubDate>Wed, 26 Dec 2007 08:40:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2077184</guid><dc:creator>murthysrn</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2077184.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=2077184</wfw:commentRss><description>&lt;p&gt;hi, It may Help u.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.codeproject.com/KB/database/MS_Application_Blocks.aspx"&gt;http://www.codeproject.com/KB/database/MS_Application_Blocks.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>what is sqlhelper</title><link>http://forums.asp.net/thread/1128292.aspx</link><pubDate>Wed, 30 Nov 2005 20:55:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1128292</guid><dc:creator>prk</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1128292.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=1128292</wfw:commentRss><description>Hi friends&lt;br&gt;whats sqlhelper ? these days am keep reading abt this class .looks like its a class related to DAAB.&lt;br&gt;am using patterns &amp;amp; practices june edition application block but i did not see any sqlhelper class in it !!&lt;br&gt;this sqlhelper class is in old version of DAAB ,is it?&lt;br&gt;Thanks for your input&lt;br&gt;</description></item></channel></rss>