RSSAll Entries in the "ADO.NET" Category

Return the value for the specific attribute using XPathNodeIterator

Return the value for the specific attribute using XPathNodeIterator

I will use the following XML document in the example below.
<? xml version="1.0" encoding="utf-8" ?> < users > < user FirstName ="Tom" LastName ="Adams" Age ="23" /> < user FirstName ="Jhon" LastName ="Brams" Age ="17" /> [...]

Row already belongs to another table

Row already belongs to another table

When copying a row from one datatable to another you might get the error "this row already belongs to another table". Typically you might write code like this:
string sConnString = ConfigurationManager.ConnectionStrings["NorthwindConn"].ConnectionString;
DataSet ds = Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(sConnString,CommandType.Text,
"select * from suppliers order by supplierid");
int nRowCount = 0;
DataTable dt = ds.Tables[0];DataTable dt2 = dt.Clone();
dt2.Clear();
foreach [...]

Debugging Stored Procedures in SQL Serrver 2005

Debugging Stored Procedures in SQL Serrver 2005

Pre-requisites
1. Find the .exe file under the directory, C:\Program Files\Microsoft SQL Server\90\Shared\1033\rdbgsetup.exe or similar path where the SQL Server was installed. The file rdbgsetup.exe stands for ‘RemoteDeBuGsetup’. Look for the emphasis on letters. The filename reads rdbgsetup because, we are going to debug a stored procedures of a database available in some remote physical [...]

Different operations on Datatable (Add, Edit, delete, Sort etc) and XML

Different operations on Datatable (Add, Edit, delete, Sort etc) and XML

Introduction
DataTable is a central object in the ADO.NET library. If you are working with ADO.NET – accessing data from database, you can not escape from DataTable. Other objects that use DataTable are DataSet and DataView. In this tutorials, I will explain how to work with DataTable. I have tried to cover most of the frequently [...]