Link to home
Start Free TrialLog in
Avatar of Kurtis
Kurtis

asked on

Pass pointers as parameters.

Hi again experts!

I want to make a function which executes an SQL sentence on any existing TQuery component. I'm attempting to pass a pointer to the TQuery object as a parameter, but the compiler gives me an error at the function prototype:
"Identifier expected but '^' found".
Here is the code:

type
 TServeis = class(TObject)
 private
  { Private declarations }
  prova: ^TQuery; //this line compiles correctly
 public
  function BDEToStringList(Sentencia,Camp: String;var Llista: TStringList): Boolean;
  function Cerca(Sentencia,Camp: String):Variant;
  function ManipulaQ(Sentencia: TStrings;PQ: ^Integer):Integer; //error
  function ConsultaQ(Sentencia: TStrings;PQ: ^TQuery):Integer; //error
 end;

Any ideas are welcome! Thank you!
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kurtis
Kurtis

ASKER

It was pretty simple.
Thanks kretzschmar!