mcosta Posted April 27, 2009 at 05:22 PM Report #259471 Posted April 27, 2009 at 05:22 PM olá pessoal, estou com um problema eu tenho um form em que tenho um dataviewgrid e agora acrescentei um binding navigator!! nesse binding navigator tenho 3 botões...um add,um delete e um save!!! eu quando clico no save ele insere na base de dados.. o código que utilizei foi este: Dim myConn As OleDbConnection = New OleDbConnection myConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data " & "Source=C:\Documents and Settings\marco\Ambiente de trabalho\HFH\Gestão_RH\Gestão_RH\bdgestao de recursos humanos.mdb;" Me.Validate() Me.FuncionáriosBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.Bdgestao_de_recursos_humanosDataSet) agora o meu problema é no delete???? como é que faço para remover da base de dados??? é que quando clico num registo ele apaga do dataviewgrid mas não me apaga da base de dados??? alguém me ajuda.... obrigado
Chamuanza Posted April 27, 2009 at 09:15 PM Report #259586 Posted April 27, 2009 at 09:15 PM Penso que é isto que pretendes Me.PrincipalBindingNavigator.BindingSource.RemoveCurrent()
Chamuanza Posted April 27, 2009 at 09:17 PM Report #259588 Posted April 27, 2009 at 09:17 PM Desculpa trocando o principal pelo teu funcionarios
mcosta Posted April 28, 2009 at 12:21 PM Author Report #259683 Posted April 28, 2009 at 12:21 PM obrigado por tudo!!! funcionou bem.... abraço
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now