Datasnap with Firedac

Asked

Viewed 276 times

0

In an application with Datasnap, I used Sqlconnection:

procedure TForm1.Button1Click(Sender: TObject);
var ConectaServidor : TUClasseServidorClient;
begin
 ConectaServidor := TUClasseServidorClient.Create(SQLConnection1.DBXConnection);
 try
     ShowMessage(ConectaServidor.mostrarTexto(Edit1.Text));
 finally
     ConectaServidor.Free;
 end;
end;

But now I need to use the Fdconnection and I need to know what its equivalent parameter is Dbxconnection of Sqlconnection:

ConectaServidor := TUClasseServidorClient.Create(FDConnection1.parâmetro);
  • Experiencepass the parameter "Connectionname", example = "Connectionserver := Tuclasseservidorclient.Create(Fdconnection1.Connectionname);"

  • [dcc32 Error] Unit1.pas(39): E2250 There is no overloaded version of 'Create' that can be called with These Arguments

  • I have no experience with this component.. I tried to help, something else gave some value to "Connectionname", example: "Connectionname := xxx;"

  • Check this out: http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Defining_Connection_(Firedac)

  • I couldn’t get...

1 answer

0


You need to change the Tuclasseservidorclient class to accept a Tfdconnection in Create.

They are very different components and there is no direct correspondence between the class Tdbxconnection and no property of Tfdconnection.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.