SQL permissions error

calgodemo since: 28 May 2019; 
 10 Sep 2019, 20:31
SQL permissions error

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

Panagiotis Charalampous's avatar
Panagiotis Charalampous since: 13 Jan 2017; 
 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

Head of Community Management at cTrader
calgodemo since: 28 May 2019; 
 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