VB .NET and Microsoft Access - Basics

Califer

New member
Joined
Mar 11, 2005
Messages
1
Programming Experience
1-3
I'm trying to set up a program that will allow users to change, delete and add new fields in Microsoft Access. I already have a database made and everyone that I asked told me that VB.Net was my best bet at making a program to use them. However, I can't find out how to access a mdb and access the fields. Can anyone help me please?
 

Rakstip

Member
Joined
Mar 14, 2005
Messages
14
Location
Alsip, IL USA
Programming Experience
Beginner
One way to do it....
Create a OleConnection to the database. Configure an OleDataAdapter to that db with sql statements. Then generate a dataset with the OleDataAdapter. Add a datagrid the the form. Set the datasource property of the datagrid to the dataset you created. Then set the datamember of the datagrid to the datatable (ie same name as dataset name). Go to the tablestyles property of the datagrid click it and the datagridtablestyle editor window will pop up. Click add and scroll to the bottom and set the mapping name to the datatable name. Then click on gridcolumnstyles and then click on add. You will then be setting up each column in the datagrid so you can view the database. For each DataGridTextBoxColumn set the mapping name the the tables column name. After you get done with all of that you have to have the OleDataadapter fill the dataset. (ie OleDbDataAdapter2.Fill(VehicleDataDataSet1)) In my app I had it do the fill on the loading of the form. It took me quite awhile to figure out.
 
Top Bottom