jcbiker Posted May 10, 2012 at 01:10 PM Report #454300 Posted May 10, 2012 at 01:10 PM Este código dáme estes erros Error 2 Type 'viat' is not defined. Error 4 'SaveChanges' is not a member of 'COMETLIS.BaseDataSet'. Error 3 'AddObject' is not a member of 'COMETLIS.BaseDataSet.ViatDataTable'. Using Context As New BaseDataSet Dim efect As New viat With { .Matr = txtMat.Text, .IdEsq = CLng(lblIdEsq.Text), .Marca = txtMarcaAd.Text, .Modelo = txtModeloAd.Text, .Combust = lblComb.Text, .CartGalp = txtCartGFAd.Text, .ValidadeCartGF = txtValAd.Text, .IdentiViaVerde = txtViaVerdeAd.Text, .UltimaREV = txtUlRevAd.Text, .Tipo = lblTipo.Text, .Situaç = "Operacional", .UltimaInsp = CDate(txtPrInspAd.Text), .DataMat = dt } context.Viat.AddObject(efect) context.SaveChanges() End Using A base é em access 2007 Alguem me pode ajudar
Caça Posted May 10, 2012 at 01:51 PM Report #454313 Posted May 10, 2012 at 01:51 PM Access? Esse código é normalmente é utilizado quando se trabalha com EntityFramework que não deve ser o caso uma vez que não suporta Access. Pedro Martins Não respondo a duvidas por PM
jcbiker Posted May 10, 2012 at 04:24 PM Author Report #454425 Posted May 10, 2012 at 04:24 PM um... e como posso resolver??
Caça Posted May 10, 2012 at 04:50 PM Report #454439 Posted May 10, 2012 at 04:50 PM Se quiseres utilizar esse tipo de código tens de mudar a tua BD para uma base de dados que seja suportada, por exemplo o SQL Server Compact é suportado e funciona totalmente offline sem precisar de um servidor de SQL Server para correr. Agora é contigo. Pedro Martins Não respondo a duvidas por PM
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