Hi,
I have developed a module which I am trying to deploy, I have generated my SQLDataProvider file which creates a table, a view, some stored procedures and a userdefined function.
However when I try to install the module I get the following error (this is just a snippet of the error there is a lot more text to it):
SQL Execution resulted in following Exceptions: System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'CONVERT'. Incorrect syntax near the keyword 'if'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean
It seems to be complaining about the CONVERT and IF in my UDF, but the UDF works fine in SQL
Does anyone have any ideas? Initially I was using CAST but that came up with the same problem.
Thanks
Pete