Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dataset BindingNavigater issue

Status
Not open for further replies.

hugh999

MIS
Nov 29, 2001
129
IE
Hi

If I add the following SQL statement to a query in MS access, then I am able to see the data from both tables in Access and if I change the data then the data gets changed in both tables.
Code:
SELECT tblMetrics.ID, tblMetrics.Username, tbProjectNames.Project, tblMetrics.Proj_Schedule, tblMetrics.MetDate, tblMetrics.DFT, tblMetrics.LDFT, tblMetrics.DWIFT, tblMetrics.DTC, tblMetrics.LDTC, tblMetrics.DWITC
FROM tblMetrics INNER JOIN tbProjectNames ON tblMetrics.ProjID=tbProjectNames.ProjID;

I wish to use VB.NET to perfrom the above. On my form, I am able to connect a Dataset to the access database by the wizard, and using the SQL statement I am able to populate a DataGrid with the data. The problem is when I make a change to any of the data and click on the save button on the BindingNavigater, I get the following error message:

(Parameter ?_2 has no default value.)

The code behind the save button is
Code:
Me.Validate()
        Me.TblMetricsBindingSource.EndEdit()
        Me.TblMetricsTableAdapter.Update(Me.MetricsDataSet.tblMetrics)
As I am new to working with .NET and Access, I do not know if the code for saving is the problem or how I created the BindingSource, TableAdapter and BindingNavigator

I appreciate any help with this.

Thanks
 
Can anyone shed some light on the best approach to display data in a Datagrid from two tables and make changes where the changes are save to their respective tables
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top