[Sample Of Apr 9th] How to create and execute SqlCommand in ADO.NET

  Sample Download : http://code.msdn.microsoft.com/How-to-Create-and-Execute-86922261 We can create and execute different types of SqlCommand. In this applilcation, we will demonstrate how to create and execute SqlCommand: 1. Create different types of SqlCommand; 2. Execute SqlCommand in different ways; 3. Display the result.  You can find more code samples that demonstrate the most typical programming scenarios…

0

[Sample Of Mar 24th] How to retrieve the Identity value after inserting a data using ADO.NET

  Sample Download : http://code.msdn.microsoft.com/How-to-Retrieve-the-511acece We often set a column as identity column when the values in the column must be unique. And sometimes we need the identity values of new data. In this application, we will demonstrate how to retrieve the identity values: 1. Create a stored procedure to insert data and return identity…

1

[Sample Of Mar 17th] How to Use DbDataReader.GetInt32 Method

  Sample Download : http://code.msdn.microsoft.com/How-to-Use-DbDataReaderGetI-dd8b52e9 DbDataReader.GetInt32 Method gets the value of the specified column as a 32-bit signed integer. In this snippet, we will demonstrate how to use DbDataReader.GetInt32 Method. 1. Create DbConnection, DbCommand; 2. Create DbDataReader to read data; 3. Use DbDataReader.GetInt32 method to get the Data of Int32 type;  You can find more…

0

[Sample Of Mar 14th] How to Use IDataAdapter.GetFillParameters Method

  Sample Download : http://code.msdn.microsoft.com/How-to-Use-IDataAdapterGetF-9b8e4be9 Now there’s no code about the IDataAdapter.GetFillParameters Method in MSDN, and the customers want it. In this snippet code, we will demonstrate how to use the IDataAdapter.GetFillParameters method: 1. Create DbConnection, DbCommand; 2. Add the Parameters to the DbCommand; 3. Create the DataAdapter and set the Connection and Command; 4….

0

[Sample Of Mar 4th] How to Get Schema Information from Database

  Sample Download : http://code.msdn.microsoft.com/How-to-Get-Schema-b66d62e2 Sometimes we may need the schema information of the database, tables or some columns. In this application, we will demonstrate how to get schema information from database: 1. In this application, we will use the SqlConnection.GetSchema Method. 2. We will use the Schema Restrictions to get the specified information. 3….

0

[Sample Of Feb 24th] How to Use IDataRecord.GetDataTypeName Method

  Sample Download : http://code.msdn.microsoft.com/How-to-Use-IDataRecordGetDa-7168b1cf Now there’s no code about the IDataRecord.GetDataTypeName Method in MSDN, and the customers want it. In this snippet code, we will demonstrate how to use the DbDataReader.GetInt32 method: 1. Create DbConnection, DbCommand; 2. Create DbDataReader to read data; 3. Use IDataRecord.GetDataTypeName method to get the data type information for the…

0

[Sample Of Nov 26th] How to Store Data of DataSet into XML File

  Sample Download :  http://code.msdn.microsoft.com/How-to-Store-Data-of-7b9710f3 In this sample, we will demonstrate how to write data into XML file from DataSet and read data into DataSet from XML. 1. We will create one dataset with two tables. 2. We will use two ways to export dataset into the XML files:WriteXml method and GetXml method. 3. We…

0

[Sample Of Nov 25th] How to modify data in DataTable and update to the data source

  Sample Download :  http://code.msdn.microsoft.com/How-to-modify-data-in-c68d35f4 We have several ways to modify the data in DataTable. In this application, we will demonstrate how to use different ways to modify data in DataTable and update to the source. 1. We use SqlDataAdapter to fill the DataTables. 2. We set  DataTable Constraints in DataTables. 4. We use DataTable…

0

[Sample Of Nov 22nd] How to use SqlDependency to get the notification in Entity Framework

  Sample Download : CS Version: http://code.msdn.microsoft.com/How-to-use-SqlDependency-5c0da0b3 VB Version: http://code.msdn.microsoft.com/How-to-use-SqlDependency-f4b8eb43 We can use the Sqldependency to get the notification when the data is changed in database, but EF doesn’t have the same feature. In this sample, we will demonstrate how to automatically update by Sqldependency in Entity Framework. In this sample, we will demonstrate two…

0

[Sample Of Sep 8th] How to fill a DataTable with the result of LinqToEntity

  Sample Download :  http://code.msdn.microsoft.com/How-to-fill-a-DataTable-b0a4feb0 This sample demonstrates how to fill a DataTable with the result of the Linq to Entity query. Linq to Entity is a simple way for the developers, but sometimes we need to use the DataTable. In this sample, we demonstrate two ways to fill a DataTable with the result of…

0