I use CSharp.
I have two columns, Start and End, datatype:smalldatetime, nullable.
If i chane column names to something similar (PeriodStart, PeriodEnd) it's all ok.
This is the error:
Incorrect syntax near the keyword 'End'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'End'.
[SqlException (0x80131904): Incorrect syntax near the keyword 'End'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +177
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +68
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2411
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +147
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1038
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +314
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +413
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +115
System.Data.DLinq.SqlClient.SqlQuerySession`1.ExecuteNonQuery() +406
System.Data.DLinq.SqlClient.SqlContext.ExecuteNonQuery(Expression query) +312
System.Data.DLinq.SimpleChangeDirector.Execute(Expression command, StringBuilder changeText) +64
System.Data.DLinq.SimpleChangeDirector.ExecuteInsert(TrackedObject item, StringBuilder changeText) +72
System.Data.DLinq.SimpleChangeDirector.Insert(TrackedObject item) +95
System.Data.DLinq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) +234
System.Data.DLinq.DataContext.SubmitChanges(ConflictMode failureMode) +230
System.Data.DLinq.DataContext.SubmitChanges() +6
NewSeasonPage.Insert(Season x) +265