От: | senglory | ||
Дата: | 01.03.10 20:11 | ||
Оценка: |
Private Sub btnAddCalendar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddCalendar.Click
Dim frm As FormCalendar = New FormCalendar()
If frm.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then
Using dbm As New DbManager(New SQLiteDataProvider(), cns)
Using fs As FileStream = New FileStream("C:\PRJ\Flow\log", FileMode.Create)
Using tw As StreamWriter = New StreamWriter(fs, Encoding.ASCII)
Dim ctx As GroupCalendarDataContext = New GroupCalendarDataContext(dbm.Connection)
ctx.Log = tw
Dim cal As GroupCalendar = New GroupCalendar()
cal.CalendarName = frm.CalendarName
ctx.GroupCalendars.InsertOnSubmit(cal)
ctx.SubmitChanges()
End Using
End Using
End Using
Refresh()
End If
End Sub
A first chance exception of type 'System.Data.SQLite.SQLiteException' occurred in System.Data.Linq.dll
Additional information: SQLite error
near "SELECT": syntax error
SELECT CONVERT(Decimal(20),SCOPE_IDENTITY()) AS [value]