The exception is as follows:
A first chance exception of type 'Devart.Data.Linq.LinqCommandExecutionException' occurred in Devart.Data.Linq.dll
I'm using:
dotConnect v5.70.124.0
Visual Studio 2010 v10.0.30319.1 RTMRel
.NET v4.0.30319 RTMRel
I have tried simplifying my code to the bear minimum in order to debug the issue and am convinced it's an issue with DotConnect, but I hope I'm wrong.
Code: Select all
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnImport.Click
Try
Dim context As DataContext1.DataContext1 = New DataContext1.DataContext1
Dim mono As Monograph1 = New Monograph1
With mono
.MonographNumber = 1
.Title = "Acacia"
End With
context.Monograph1s.InsertOnSubmit(mono)
context.SubmitChanges()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Am I missing something very fundamental?
I'm able to query the DB no problem using the same dataContext, so I know that that is setup correctly.