Posted on November 23rd, 2015 by Naibedya Kar
As we all know Dataset plays a significant role while working with .net applications. Those who are new to dataset, it is just an in memory representation of table data. This object is sufficient to differentiate classic ADO and ADO.NET. Constraints are nothing but conditions applied to the table Column or Columns to maintain data […]
Posted on November 23rd, 2015 by Priyanka Dash
Sometimes, we have requirements in which we have to retrieve data from different tables at one time that take too long time to execute because of bulk data. In that case we have to wait for execution of first query to complete to start the second one. This makes a long waiting time and hence […]
Posted on November 23rd, 2015 by Amit Mohapatra
In some situations we feel the need to close a SQL connection object immediately after the SQL query operation with a associated reader is complete. We can not close the connection before we complete all the operations related to the reader. Also we need to close the connection immediately after we finish the use of reader object. […]
Posted on November 23rd, 2015 by Priyanka Dash
Compute is one of the methods of DataTable class. This method computes an expression on the current rows that pass the filter criteria. Syntax Object DataTable.Compute(string expression , string filter) Expression – The expression to compute. Filter – The filter to limit the rows that evaluate in the expression. This method’s return […]
Posted on November 23rd, 2015 by Soumya Patnaik
If you want to copy all the data from one table to another ,then this tip can be helpful to you. The following code snippet copies all the data from theEmployee Table to “Employee1” provided the tables have same columns and constraints. Public Sub TranseferAllEmployeeData() Dim Sqlcmd As New SqlCommand Dim strSQL As String = […]
Posted on November 23rd, 2015 by Sathyan R
Background: When we use a ADO.NET Entity Data Model (.edmx file) inside a ADO.NET Data Service (.Svc) file in a WebApplication project, we get an Exception saying that “Unable to load the specified metadata” whereas this works just fine in a website project. More Details & Solution: If we create an ADO.NET Data Service inside […]
Posted on November 23rd, 2015 by Rabinarayan Biswal
To acess data from a Data Reader, we mostly use the column / field name to retrieve data from a field . And we use field name instead of index atlest for the following two reasons :- 1. using field name instead of index makes the code more readable 2. if the column order changes […]
Posted on November 23rd, 2015 by Sumit Singh
In a application if you wants to take data from two table which have no relation to each other.At this situation you write two separate SQL query to take data from data base there is a work around to take data from multiple table in single a query. In this sample code below: I want […]
Posted on November 23rd, 2015 by Rabinarayan Biswal
While working in a project around a year back, I was facing trouble while downloading data from a SQL server to sqlite database. The SQL server DB contained millions of records (CAd/CAM refernece data) in some table that I needed to download to the SQLite DB.In fact the records were inserted to the SQL server […]
Posted on November 23rd, 2015 by Soumitra Das
If you have a CSV file from which you want to import the data into the database and the CSV file has a column which contains values separated by multiple commas, you cannot extract the data by using the Split() function. That is because of the fact that the number of values you get will […]
Posted on November 23rd, 2015 by Rabinarayan Biswal
Choosing between DataTable and DataReader has been a point of debate since the evolution of ADO.NET. Here are some simple guidelines which can help you choose the one for your application. Choose DataTable: To reuse the same set of rows across different function calls throughout the application. To achieve a performance gain by caching them […]
Posted on November 23rd, 2015 by Aditya Acharya
In ADO.NET we deals with DataTable and DataSet as the representations of different table of our actual database. So we can write complex queries to fetch information from different table by joining them ,adding subqueries to fetch particular information etc… . We can say it behaves same as the view of SQLServer. Here is a […]