Heavenly
Well-known member
With the code below I’m able to create the records but I’m not able to see it in the DataGridView in real time. (Master-child relationship exist)
The only way to see the records created is by quitting the application and running it again. Then the records appear just fine inside the DataGridView. It is like the DataGridView refuses to perform a refresh.
I also tried this with no luck:
Could anyone tell me what instructions I’m missing from the code below?
The only way to see the records created is by quitting the application and running it again. Then the records appear just fine inside the DataGridView. It is like the DataGridView refuses to perform a refresh.
I also tried this with no luck:
VB.NET:
[FONT='Courier New'] TblStartStopDataGridView.Refresh()[/FONT]
[FONT='Courier New'] TblHoursBindingNavigator.Refresh()[/FONT]
Could anyone tell me what instructions I’m missing from the code below?
VB.NET:
[COLOR=blue][FONT='Courier New']Public[/FONT][/COLOR][FONT='Courier New'] [COLOR=blue]Sub[/COLOR] CreateNewRecordTableStartStop()[/FONT]
[FONT='Courier New'] [/FONT]
[FONT='Courier New'] [COLOR=blue]If[/COLOR] tableHoursUpdating = [COLOR=blue]False[/COLOR] [COLOR=blue]Then[/COLOR][/FONT]
[FONT='Courier New'] tableStartStopUpdating = [COLOR=blue]True[/COLOR][/FONT]
[FONT='Courier New'] [COLOR=blue]Try[/COLOR][/FONT]
[FONT='Courier New'] frmMain.TblStartStopTableAdapter.Insert(m_IDtableStartStop, m_TimePressWasStop, m_TimePressWasStart, m_ReasonPressWasStop, m_PartsMadeBeforeStop, m_PartsMadeDuringStop, m_PartsMadeTotal, m_MinutesPressWasStop, m_Tonnage, m_ShutHeight)[/FONT]
[FONT='Courier New'] [COLOR=blue]My[/COLOR].Computer.Audio.PlaySystemSound(Media.SystemSounds.Hand)[/FONT]
[FONT='Courier New'] [COLOR=blue]Catch[/COLOR] ex [COLOR=blue]As[/COLOR] Exception[/FONT]
[FONT='Courier New'] MessageBox.Show([COLOR=maroon]"There were problems Inserting a new record to the Database Table: START-STOP"[/COLOR], [COLOR=maroon]"Hubbell Press #103 Scada"[/COLOR], MessageBoxButtons.OK, MessageBoxIcon.Information)[/FONT]
[FONT='Courier New'] [COLOR=blue]End[/COLOR] [COLOR=blue]Try[/COLOR][/FONT]
[FONT='Courier New'] tableStartStopUpdating = [COLOR=blue]False[/COLOR][/FONT]
[FONT='Courier New'] [COLOR=blue]End[/COLOR] [COLOR=blue]If[/COLOR][/FONT]
[COLOR=blue][FONT='Courier New'] [/FONT][/COLOR]
[FONT='Courier New'] [COLOR=blue]End[/COLOR] [COLOR=blue]Sub[/COLOR][/FONT]
[COLOR=blue][FONT='Courier New'] [/FONT][/COLOR]
[COLOR=blue][FONT='Courier New']End[/FONT][/COLOR][FONT='Courier New'] [COLOR=blue]Module[/COLOR][/FONT]