We recently upgrade an old DW8 to DW9 currently on DW 9.3.
The thing is, when we do a search backend in the user list and search for at text string the result is displayed just fine.
But when we do a search on a number we end up whit this: "Conversion failed when converting the nvarchar value 'DK36937599' to data type int".I know what it is. It is the column "AccessUserVatRegNumber" in the tabel AccessUser witch is defind af nvarchar(20). Our customer have all CVR numbers in the above format.
What to do?
Error stack trace:
[SqlException (0x80131904): Conversion failed when converting the nvarchar value 'DK36937599' to data type int.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +3189216
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +753
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +5042
System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) +278
System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) +295
System.Data.SqlClient.SqlDataReader.Read() +42
Dynamicweb.Security.UserManagement.User.GetUsersBySql(String sqlCommandText) +125
Dynamicweb.Admin.UserManagement.ListUsers.GetUsersFromGroups() +3155
Dynamicweb.Admin.UserManagement.ListUsers.GetUsers() +103
Dynamicweb.Admin.UserManagement.ListUsers.get_Users() +28
Dynamicweb.Admin.UserManagement.ListUsers.MakeList() +780
Dynamicweb.Admin.UserManagement.ListUsers.Page_PreRender(Object sender, EventArgs e) +43
System.Web.UI.Control.OnPreRender(EventArgs e) +11911581
System.Web.UI.Control.PreRenderRecursiveInternal() +162
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6925