Access Datasource Select Arguments and DataViews

The following example shows how to pass arguments to AcccessDataSource/Sql Datasource Select Method.

DataView dataView = new DataView();
AccessDataSource2.SelectParameters[0].DefaultValue = "23233";

dataView = (DataView)AccessDataSource1.Select(DataSourceSelectArguments.Empty);

//Iterate Dataview
foreach (DataRowView p in dataView)
{
ID = Convert.ToInt32(p[0]);
Parent = Convert.ToString(p[1]);
Child = Convert.ToString(p[2]);
Status = Convert.ToString(p[3]);
ParentRev = Convert.ToString(p[4]);
BubbleNo = Convert.ToString(p[5]);
}

Comments

Popular posts from this blog

Windows Azure Package Build Error: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Resource ID : 1. The request limit for the database is 180 and has been reached.

How to get Client's Location using IPAddress