return NHibernateSession.CreateQuery(@"TRUNCATE TABLE dbo.Exceptions").ExecuteUpdate();
Exception of type 'Antlr.Runtime.NoViableAltException' was thrown. [TRUNCATE TABLE Exceptions] 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: NHibernate.Hql.Ast.ANTLR.QuerySyntaxException: Exception of type 'Antlr.Runtime.NoViableAltException' was thrown. [TRUNCATE TABLE Exceptions]
Source Error:
any idea why?
TRUNCATE TABLE is not a valid HQL statement.
Use CreateSQLQuery
instead of CreateQuery
to execute SQL statements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With