Hi,
So ive checked that the database doesn't replace the one in build when running. "Copy if newer" is selected.
I have a datatable in memory loaded with info. Ive connected a database (access) to my project, datasource, setup the dataset etc etc.
Problem is im trying to copy the rows from the datatable in memory to the datatable in my dataset. (identical structure)
Im trying to save these data in the dataset using:
This code runs fine but never updates my database.
If I use datagrid dragged via datasource toolbox onto the form, and manually enter data and use the save code, it works just fine.
The data is being imported correctly in memory. Ive hooked the datatable from my dataset to datagrid and refresh after the copy is done and all +30k records is loaded.
Any help on what I might be missing here? Suggestions to improve is welcomed as always.
So ive checked that the database doesn't replace the one in build when running. "Copy if newer" is selected.
I have a datatable in memory loaded with info. Ive connected a database (access) to my project, datasource, setup the dataset etc etc.
Problem is im trying to copy the rows from the datatable in memory to the datatable in my dataset. (identical structure)
Code:
For Each dr As DataRow In dtExcelImportedData.Rows
PlanningDBDataSet.DataImported.ImportRow(dr)
Next
Im trying to save these data in the dataset using:
Code:
Me.PlanningDBDataSet.DataImported.Clear()
Me.Validate()
Me.DataImportedBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.PlanningDBDataSet)
This code runs fine but never updates my database.
If I use datagrid dragged via datasource toolbox onto the form, and manually enter data and use the save code, it works just fine.
The data is being imported correctly in memory. Ive hooked the datatable from my dataset to datagrid and refresh after the copy is done and all +30k records is loaded.
Any help on what I might be missing here? Suggestions to improve is welcomed as always.