Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 7th, 2006, 08:02 AM
Registered User
 
Join Date: Jun 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default populate Gridview from MSaccess data

Dear All,

 Please, I have Visual Studio 2005 , How Can I use Gridview in Web Site to Retreive Data from MSACCESS 2002 Database without using (AccessDataSource) Control , Only using C# Code? Can I do that?
 
Old June 19th, 2006, 01:25 AM
Authorized User
 
Join Date: Jun 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi....

I dont understand what you meant by "without using AccessDataSource control"

Yes... u can do that

But u need to create an object of type AccessDataSource at Runtime

like this....

    protected void Page_Load(object sender, EventArgs e)
    {
        AccessDataSource shyam=new AccessDataSource("c:\\shyam.mdb","SELECT * FROM shyam");
        GridView1.DataSource = shyam;
        GridView1.DataBind();
    }

Thanks Much,
Shyam

The .NET Underground Portal
www.pureportals.com/developers





Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView auto populate stonesbg ASP.NET 1.0 and 1.1 Basics 0 February 19th, 2007 10:41 AM
how do i get data from MSaccess by vc++ stumpted Visual C++ 1 July 2nd, 2006 06:15 PM
GridView populate kalchev ASP.NET 2.0 Basics 2 April 18th, 2006 05:08 AM
Writing to an msAccess db from txtBox Data sconineuk ADO.NET 0 March 8th, 2006 03:13 PM
Importing Data to MsAccess ranakdinesh ADO.NET 2 February 24th, 2005 10:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.