Subject IBObjects with DataSnap Rest throws fbclient.dll access violation
Author

The following small code works fine in any project. However, when I call it from a DataSnap server method, the Open() throws "Access violation at address 05CE29DB in module 'fbclient.dll'. Write of address 00000044"


    TIB_Connection* db = new TIB_Connection(this);
    db->Connected=false;
    db->Username="SYSDBA";
    db->Password="masterkey";
    db->Path="e:\\bd\\MyDb.fdb";
    db->Protocol=cpTCP_IP;
    db->Server="localhost/3050";
    db->Open();



The project is the predefined DataSnap Rest server project of Rad Studio. Then, in a method, I copy the above code.


If I call the same code from a button added in the same DataSnap project, it works without problem.


I am totally blocked. Any help or guideline will be welcome.


Thanks