I'm building this WF app and am trying to insert new data to my table (tbl_registro) but am not able to commit the insert to the database. I'm using a local database file (SQLExpress). This insert seems to stay in memory until I close the debug but it does not make into the database.
Here is the insert code:
AL Almeida
CIO
May all those that come behind us, find us faithful.
Here is the insert code:
Code:
Try
' create a new Regitro record since the Registro ID
' does not exist
Dim Registro As Table(Of tbl_registros) = Accessor.GetRegistroTable()
Dim reg As New tbl_registros With { _
.numero = numero, _
.emitente = emitente, _
.cpf = cpf, _
.marca = marca, _
.modelo = modelo, _
.serie = serie, _
.motor = motor, _
.ano = ano}
' add the new Registro to the database
Registro.InsertOnSubmit(reg)
Registro.Context.SubmitChanges()
Catch ex As Exception
Throw ex
End Try
AL Almeida
CIO
May all those that come behind us, find us faithful.