I understand your way. I was doing very similar thing in MS Access with
pass-through queries:) and was always wondering why Microsoft didn't enable
parameters in pass-through queries...
I am just reading a book about Delphi (Paul Kimmel: "Building Delphi 6
Applications) and there is described this ParamByName method. It seems that
the completely the same is implemented in Lazarus, so I don't understand why
it doesn't work in my case. I suppose that I do some mistake:(
Best regards,
Zlatko
----- Original Message -----
From: "Alexandre Leclerc" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, August 22, 2006 9:35 PM
Subject: Re: [lazarus] parameterized queries
2006/8/22, Zlatko Matic <[EMAIL PROTECTED]>:
What is wrong with passing parameters through ParamByName, such as:
SQLQuery1.Params.ParamByName('parameter').AsString:='blah, blah' ?
There is nothing wrong: I never used it nor knew it ever existed (this
is the reason of my initial answer). But there is nothing wrong using
that other method. The example you provided could be as dangerous with
the Param method, since in essence it does the same (as far as I can
extrapolate).
Instead of using parameters I was having my SQL queries and const with
%s commands then simply replacing with the parameters with actual
desired values, then using the result directly in a TQuery. This is
just another way to work.
Regards.
--
Alexandre Leclerc
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives