The following is my code. When I see table data after executing of this code, it still is blank. Any ideas to make the following code work would be appreciated.
Dim dbcontext As New Model1Container
Dim employee As New emp
employee.empid = 1
employee.empname = "some name"
employee.empaddress = "some address"
dbcontext.emps.AddObject(employee)
Try
dbcontext.SaveChanges()
Catch ex As Exception
MsgBox(ex.Message)
End Try
I am using VS 2010 Professional Edition and SQL Server 2008 Express Edition.
Didyou try with
dbcontext.SubmitChanges()
Reference - 1
Reference - 2