public CommonOneAlbum(string subquery, string albumhash, AccessDataSource generator, HttpResponse response) { m_subquery = subquery; m_albumHash = albumhash; m_generator = generator; m_response = response; }
public AccessDataSourceConnectionChooserPanel(AccessDataSourceDesigner accessDataSourceDesigner, AccessDataSource accessDataSource) : base(accessDataSourceDesigner) { this._accessDataSource = accessDataSource; this._accessDataSourceDesigner = accessDataSourceDesigner; this.InitializeComponent(); this.InitializeUI(); this.DataFile = this._accessDataSource.DataFile; }
public void Run(string empName) { string queryString = "SELECT * FROM Employee where Name = " + empName; System.Web.UI.WebControls.AccessDataSource accessData = new System.Web.UI.WebControls.AccessDataSource(); accessData = new AccessDataSource(dataFilePath, queryString); System.Web.UI.WebControls.SqlDataSource sqlData = new System.Web.UI.WebControls.SqlDataSource(); sqlData = new System.Web.UI.WebControls.SqlDataSource(connectionstring, queryString); sqlData = new System.Web.UI.WebControls.SqlDataSource(provider, connectionstring, queryString); sqlData = new System.Web.UI.WebControls.SqlDataSource(selectCommand: queryString, connectionString: connectionstring); sqlData = new System.Web.UI.WebControls.SqlDataSource(providerName: provider, selectCommand: queryString, connectionString: connectionstring); sqlData.SelectCommand = queryString; sqlData.UpdateCommand = queryString; sqlData.InsertCommand = queryString; sqlData.DeleteCommand = queryString; }
internal static string GetConnectionString(IServiceProvider serviceProvider, System.Web.UI.WebControls.AccessDataSource dataSource) { string connectionString; string dataFile = dataSource.DataFile; try { if (dataFile.Length == 0) { return(null); } dataSource.DataFile = UrlPath.MapPath(serviceProvider, dataFile); connectionString = dataSource.ConnectionString; } finally { dataSource.DataFile = dataFile; } return(connectionString); }
public AccessDataSourceView(AccessDataSource owner, string name, System.Web.HttpContext context) : base(default(SqlDataSource), default(string), default(System.Web.HttpContext)) { }
private void SetDataSource(Grid grid) { AccessDataSource ds = new AccessDataSource(); ds.SelectCommand = "SELECT [CategoryID], [CategoryName], [Description] FROM [Categories]"; ds.DeleteCommand = "DELETE FROM [Categories] WHERE [CategoryID] = ?"; ds.InsertCommand = "INSERT INTO [Categories] ([CategoryName], [Description]) VALUES ( ?, ?)"; ds.UpdateCommand = "UPDATE [Categories] SET [CategoryName] = ?, [Description] = ? WHERE [CategoryID] = ?"; ds.InsertParameters.Add("CategoryName", null); ds.InsertParameters.Add("Description", null); ds.UpdateParameters.Add("CategoryName", null); ds.UpdateParameters.Add("Description", null); ds.DeleteParameters.Add("CategoryID", null); ds.UpdateParameters.Add("CategoryID", null); ds.ID = "test1"; ds.DataFile = Path + "\\App_Data\\Nwind.mdb"; Testpage.Controls.Add(ds); grid.DataSourceId = ds.ID; grid["CategoryID"].Primarykey = true; grid["CategoryID"].Identity = true; }
private static int GetCategoryId() { AccessDataSource ds = new AccessDataSource(); ds.SelectCommand = "SELECT TOP 1 CategoryID FROM Categories ORDER BY CategoryID DESC"; ds.ID = "test1"; ds.DataFile = Path + "\\App_Data\\Nwind.mdb"; return (int) ((DataView) ds.Select(DataSourceSelectArguments.Empty))[0]["CategoryID"]; }
public void SelectFromAccessDataSourceControlSearch() { SelectFromAccessDataSourceControl(); Grid grid = new Grid(); SetupGrid(grid); AccessDataSource ds = new AccessDataSource(); ds.SelectCommand = "select * from Employees"; ds.ID = "test1"; ds.DataFile = Path + "\\App_Data\\Nwind.mdb"; Testpage.Controls.Add(ds); grid.DataSourceId = ds.ID; grid.Search = "ol -olav"; StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); HtmlTextWriter gridwriter = new HtmlTextWriter(sw); grid.RenderControl(gridwriter); Assert.Less(grid.MasterTable.Rows.Count, employees); }
public AccessDataSourceView (AccessDataSource owner, string name, HttpContext context) : base (owner, name, context) { dataSource = owner; oleConnection = new OleDbConnection (owner.ConnectionString); }
public AccessDataSourceView(AccessDataSource owner, string name, HttpContext context) : base(owner, name, context) { this._owner = owner; }
public AccessDataSourceView(AccessDataSource owner, string name, HttpContext context) : base(owner, name, context) { dataSource = owner; oleConnection = new OleDbConnection(owner.ConnectionString); }
public AccessDataSourceView(AccessDataSource owner, string name, System.Web.HttpContext context) : base (default(SqlDataSource), default(string), default(System.Web.HttpContext)) { }
public static IEnumerable GetData() { using (AccessDataSource dataSource = new AccessDataSource("~/App_Data/gsp.mdb", "SELECT Year, Region, GSP FROM GSP")) return dataSource.Select(new DataSourceSelectArguments()); }
/// <devdoc> /// Creates a new instance of AccessDataSourceView. /// </devdoc> public AccessDataSourceView(AccessDataSource owner, string name, HttpContext context) : base(owner, name, context) { Debug.Assert(owner != null); _owner = owner; }