3

I'm trying some TServerMethods and all of those interact with my Firebird DB.

I don't want to get the SQLConnection.DBXConnection in every method that I'll create, but I want to inherit that behavior from a superclass that will setup a protected DBXConnection everytime my ServerMethod is called, inside a inherited Create, or something like that.

I could find any way to do that besides calling my procedure SetupDBXConnection everytime. There's some way to do that?

Thanks.

Eduardo Maia
  • 587
  • 1
  • 5
  • 10
  • I must have forgotten to say, but i'll used Andreano Lanusse's article (http://www.andreanolanusse.com/pt/publicando-providers-durante-o-registro-dinamico-de-datasnap-server-class/) to get the same effect publishin TServerMethods at runtime, and it worked! But i can't setup a constructor, because it doesn't work. – Eduardo Maia Oct 25 '11 at 01:19
  • All your SetupDBXConnection has to have is `If not SQLConnection.Connected then SQLConnection.Connected = True;` to achieve the optimisation you want. – Freddie Bell May 27 '15 at 18:46

0 Answers0