Changing my query and causing SQL exception
Asked Answered
T

1

6

I'm lovin MiniProfiler for our .NET project. However, I'm running into an issue. The profiler is actually causing queries to be slightly different which is causing errors. For example, when the profiler is not initialized, a SQL query is generated which contains nvarchar(4000). However, with the profiler initialized, that part of the query has been changed to nvarchar(max). This causes the following SqlException:

The full-text query parameter for Fulltext Query String is not valid.

I haven't found anybody with a very similar issue.

One solution would be to be able to dynamically de-initialize MiniProfiler somehow before this specific query is executed so that for just this one query, the default DBProviderFactory would be used rather than MiniProfiler's DBProviderFactory. However, this doesn't seem to be supported.

Thylacine answered 26/2, 2013 at 22:28 Comment(2)
Is there any way you can create the steps to reproduce the issue? For example, a script to create the table and full-text catalog and a query that is altered?Sylph
I've created an issue on github: github.com/SamSaffron/MiniProfiler/issues/144Upbraid
R
0

If you are using entity-framework then update model because you are changing in a field range.

Rawlings answered 16/4, 2013 at 12:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.