Code: Select all
unit dDocumentMain;
interface
uses
Borland.Vcl.SysUtils, Borland.Vcl.Classes, System.Data, System.ComponentModel,
Borland.Vcl.Db, cExtprocTesterClasses, Contnrs, Variants, CoreLab.Common,
CoreLab.Oracle, Borland.Vcl.Math;
[...]
type
[...]
TDocumentMain = class(TDataModule)
[...]
procedure TestProcedure(const P:OracleCommand; out Result:String);
[...]
end;
[...]
implementation
[...]
procedure TDocumentMain.TestProcedure(const P: OracleCommand;
out Result: String);
resourcestring
pnOperation='OPERATION';
[...]
var
opCurrent:OracleParameter;
I:Integer;
begin
[...]
try
for I:=0 to P.Parameters.Count-1 do
begin
opCurrent:=P.Parameters[I];
if SameText(opCurrent.ParameterName,pnOperation) then
begin
opCurrent.Value:=-1;
Continue;
end;
[...]
[Error] dDocumentMain.pas(311): E2010 Incompatible types: 'Object' and 'Integer' on the line "opCurrent.Value:=-1;"
I'm just started to do .NET programming so i cannot understand what is wrong? Why Value declared as "Object" instead of "Variant" or something like this? How can i set parameter of certain type, if this parameter already in the Parameters collection?