Duration: 19:54 min
Summary: In this video, we will continue our discussion of how to read data from the database. As you recall in the previous step, we created the database (Employees.mdf). We added one table named Employee, and we inserted data into the table. Now we need to create a connection to the database, initialize a command, and loop over the records. As we do so, we will add every record to the Employees list that we already have in the web service. We will be using the “using” statement so we do not have to close the connection and the command. That will be automatically taken care of. Another thing we need to look into is the actual connection. We will see an easy way to make sure we are using the correct connection to the database. Now that we have the database ready and we are able to read data, we will see in the upcoming videos how to insert, update and delete records from the grid.
Technologies and Resources: jQuery, jqGrid, Visual Studio 2010, WebService, asmx, url, datatype, contenttype, colNames, colModel, pager, jsonReader, page, total, records, root, SqlDataReader, SqlCommand, SqlConnection, Read, finally, Close.