QueryBuilder throws security exception

Stimulsoft Reports.WPF discussion
Post Reply
robocik
Posts: 6
Joined: Fri Apr 05, 2013 7:24 am

QueryBuilder throws security exception

Post by robocik »

I've created a very simple project in WPF. I use QueryBuilder control in the main window. But when I try to set SQL property of QueryBuilder I get this exception:
Attempt by security transparent method 'Stimulsoft.Database.QueryBuilder.SetSQL(System.String)' to call native code through method 'Stimulsoft.Database.Win32.PostMessage(IntPtr, Int32, IntPtr, IntPtr)' failed. Methods must be security critical or security safe-critical to call native code.
MainWindow Xaml code:

Code: Select all

<WindowsFormsHost Grid.Row="1" x:Name="BrowserHost">
      <Database:QueryBuilder x:Name="queryBuilder" />
</WindowsFormsHost>
I use the following code to fill querybuilder control:

Code: Select all

StiSqlMetadataProvider provider = new StiSqlMetadataProvider(new SqlConnection(connectionString));
queryBuilder.MetadataProvider = provider;
queryBuilder.SyntaxProvider = new MSSQLSyntaxProvider();
queryBuilder.SQL = string.Empty;
queryBuilder.RefreshMetadata();
Exception is thrown in this line: queryBuilder.SQL = string.Empty;

I used .NET 4 project but on my machine I also have Visual Studio 2012 installed (so probably I ran this app using .NET 4.5). Stimulsoft is version: 2012.3.1500.0

How can I solve this problem?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: QueryBuilder throws security exception

Post by HighAley »

Hello.

We couldn't reproduce the issue.
Could you send us a sample project which reproduces the issue?

Thank you.
robocik
Posts: 6
Joined: Fri Apr 05, 2013 7:24 am

Re: QueryBuilder throws security exception

Post by robocik »

Thanks for quick feedback. I've realized that I downloaded old version of your product (see the version number from my initial post: 2012.3.1500.0). I don't know how I downloaded it (where did I find this old version because yesterday basically I wanted to try out your latest version). But anyway, when I downloaded the latest version then problem is gone and everything is working good.
Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: QueryBuilder throws security exception

Post by HighAley »

Hello.

Maybe the issue was fixed.
Please, let us know if you will have any problems else.

Thank you.
Post Reply