SQL permissions error

Created at 10 Sep 2019, 20:31
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
CA

calgodemo

Joined 28.05.2019

SQL permissions error
10 Sep 2019, 20:31


Hi everyone,

Trying to write some indicator outputs to a DB and I get the following error when I try to open the connection:

 

Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.'

I've done some research into this and the internet suggests I change the security on the project to full access, only the security tab where this setting resides doesn't exist when I go to the project settings. 

I've seen on here others are connecting to Sql databases, how?!

Thanks!

CaD

 


@calgodemo
Replies

PanagiotisCharalampous
11 Sep 2019, 08:26

Hi calgodemo,

Did you try changing the access rights of the cBot to FullAccess? See below

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
    public class NewcBot : Robot
    {

Best Regards,

Panagiotis


@PanagiotisCharalampous

calgodemo
11 Sep 2019, 20:20

That did it - Thanks!

I think what threw me off was in doing my research I saw other indicators/bots where the access level was still set to none. I don't know but your suggestion has fixed it for me. 

Much appreciated!

CaD


@calgodemo