Solved

VB.Net - Connecting a datagridview to an access database

Posted on 2011-09-22
2
251 Views
Last Modified: 2012-05-12
Hi Experts.   In VB.net, I have a datagridview and have set the binding source to bindingsource1 and a BindingNavigator also connected to bindingsource1.
I then have bindingsource1 connected to a dataset which connect successfully to an small Access Database.   All these connections are made under properties.  When I run the program I get nothing in the Datagridview.  Shouldnt I get the databse data appearing in the Datagridview?    
0
Comment
Question by:PNRT
2 Comments
 
LVL 11

Accepted Solution

by:
Deepak Lakkad earned 500 total points
ID: 36580102
Hi
Try following code

YourDataGridView.DataSource = YourBidningSource
0
 
LVL 2

Author Comment

by:PNRT
ID: 36580154
Still the same I'm afarid.  If I disconnect bindingsource1 from the dataset then the DGV and the navigator work OK together, but as soon as I add the dataset to bindingsource1, the DGV and the navigator are all greyed out.  Thanks for the reply
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question