Hi, i need some help if possible.
I designed a software on vb 2012 with a local access 2010 database, it runs ok,it add's delete and changes record's. However when i start the software it deletes the added records on the previous session. the software is designed with the dataset's. I suppose that the error is on the fill that runs on the form.load. But i can't see the error.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If MilitaresTableAdapter.Connection.State = ConnectionState.Closed Or MilitaresTableAdapter.Connection.State = ConnectionState.Broken Then
Me.MilitaresTableAdapter.Connection.Open()
Me.MilitaresTableAdapter.GetData()
Else
Me.MilitaresTableAdapter.GetData()
Me.MilitaresTableAdapter.Fill(Me.UCCESCALASDataSet.Militares)
End If
Splash.Show()
Dim user As String
Dim data As String
data = Date.Today
user = My.User.Name
If user = "RNSI\" + "g1960931" Or user = "RNSI\" + "g1991037" Or user = "RNSI\" + "g1880220" Then
Label4.Text = user
Label6.Text = data
Else
MsgBox("Utilizador Não Autorizado", MsgBoxStyle.Critical)
End
End If
End Sub