Once you build your connection string are you creating it against the app? It could be that the connection string has not been saved or not been setup correctly.
If you use the createNewConnection() method (example below) it should use the parameters in both your QvxConnection.cs and QvxServer.cs files so when using the sendJsonRequest method, as an example, or reloading, MParameters should be populated.
input.serverside.createNewConnection( $scope.name, $scope.connectionString, $scope.username,$scope.password);
where $scope.connectionString should look something like this -
"CUSTOM CONNECT TO \"provider=QlikViewExpressorConnector.exe; myCustomParam="myParam";\""
I hope that helps.
Thanks for your help, but I think the problem is not related to the configuration of connection.
I am setting up the connection string as it was done in QvxSDK_2.1x64 examples. It means, I use just standard code in connectdialog.js
I checked the workflow in debug mode very carefully and it works like that:
When I open my custom connector I am seeing connectdialog.ng.html window for typing credentials. At that stage everything is fine. When I press “Create a new connection” (onOKClicked()) button I can see that MParameters is populated in my QvXXXConnection, which is fine.
However, at the moment of clicking “Select Data” MParameters is null in
public override void Init() method but populated in HandleJsonRequest
The second method:
public override string HandleJsonRequest(string method, string userParameters, QvxConnection connection)
is called later and then I have MParameters but it is too late because I don’t have information about state to initialize connection and set up MTables
I am able to provide more details if requested, but I think, it is impossible for now to use state in Init method for QvXXXConnection : QvConnection class
MParameters is null in Init method but populated in HandleJsonRequest at later stage.
Do you know if there is any way to read the state in Init?
Your help would be much appreciated.
I believe the behaviour you describe is 'working as designed' so to speak. The MParameters info is only available within the QvxConnection class when reloading as far as I know. When setting up the connection and selecting data I tend to push everything to the HandleJsonRequest method, the only downside being that there is no persistence in the connection. By that I mean you can't connect to a source in your QvxServer.cs and keep that connection open and reuse it. With each HandleJsonRequest you'll need to reconnect.
I hope that helps.