我创建了一个利用数据库存储信息的应用程序,我现在如何允许从沿同一 LAN 连接的任何计算机更新该信息。因此,一旦有人输入并保存新信息,同一应用程序中的所有其他数据库都会更新。
Private Sub MLGMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Start()
'how do i get MLGDatabaseDataSet to be a file path here'
Me.LocationRecordTableAdapter.Fill(Me.MLGDatabaseDataSet.LocationRecord)
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
UPDATETIME = UPDATETIME + 1
Label1.Text = UPDATETIME
If UPDATETIME > 700 Then
'---------------------------------------UPDATE DATABASE-----------------------------------------'
LocationRecordDataGridView.Refresh()
LocationRecordDataGridView.DataSource = Nothing
LocationRecordDataGridView.DataSource = ("C:\Users\User\Documents\folder\MLGDatabase.sdf")
Me.LocationRecordDataGridView.DataSource = LocationRecordBindingSource
LocationRecordBindingSource.RemoveFilter()
LocationRecordDataGridView.Refresh()
LocationRecordDataGridView.Refresh()
UPDATETIME = 0
End If
End Sub