Discussion:
Painful Migration on Midess from D5 to D7
(too old to reply)
Hardy
2010-07-30 06:06:55 UTC
Permalink
Hi,

We are trying to migrate our program from D5.1 to D7.1,
We use Midess 1.1 (Midas Essential Pack) from Dan Miser and IBX in
D7.1

The same codes that were running for about 10 years on IBX 4.52 in
D5.1 are causing
problem when inserting, update or delete in D7.1

Program generate error in statement Delta := (IDispatch(AProvider[0])
as IAppServer).AS_ApplyUpdates(AProvider[1], Delta, 0, ErrCount,
OwnerData)

The error message is:
Project Test.exe raised exception class EIBClientError with message
'SQL Parse Error: Parameter name expected'. Process stopped. Use Step
or Run to continue


Please help........!


procedure ApplyDelta(AProvider: OleVariant; var Delta : OleVariant;
Local: Boolean);
var
ErrCount : integer;
OwnerData: OleVariant;
begin
if not VarIsNull(Delta) then
begin
if Local then
// the program control goes to here and causing error
msg....why ?
Delta := (IDispatch(AProvider[0]) as
IAppServer).AS_ApplyUpdates(AProvider[1], Delta, 0, ErrCount,
OwnerData)
else
Delta :=
IAppServerDisp(IDispatch(AProvider[0])).AS_ApplyUpdates(AProvider[1],
Delta, 0, ErrCount, OwnerData);

if ErrCount > 0 then
SysUtils.Abort;
end;
end;
Jamie
2010-07-31 15:53:51 UTC
Permalink
Post by Hardy
Hi,
We are trying to migrate our program from D5.1 to D7.1,
We use Midess 1.1 (Midas Essential Pack) from Dan Miser and IBX in
D7.1
The same codes that were running for about 10 years on IBX 4.52 in
D5.1 are causing
problem when inserting, update or delete in D7.1
Program generate error in statement Delta := (IDispatch(AProvider[0])
as IAppServer).AS_ApplyUpdates(AProvider[1], Delta, 0, ErrCount,
OwnerData)
Project Test.exe raised exception class EIBClientError with message
'SQL Parse Error: Parameter name expected'. Process stopped. Use Step
or Run to continue
Please help........!
procedure ApplyDelta(AProvider: OleVariant; var Delta : OleVariant;
Local: Boolean);
var
ErrCount : integer;
OwnerData: OleVariant;
begin
if not VarIsNull(Delta) then
begin
if Local then
// the program control goes to here and causing error
msg....why ?
Delta := (IDispatch(AProvider[0]) as
IAppServer).AS_ApplyUpdates(AProvider[1], Delta, 0, ErrCount,
OwnerData)
else
Delta :=
IAppServerDisp(IDispatch(AProvider[0])).AS_ApplyUpdates(AProvider[1],
Delta, 0, ErrCount, OwnerData);
if ErrCount > 0 then
SysUtils.Abort;
end;
end;
Looks like your logic is backwards in the "If not VarIsNull(Delta)"
statement..
You are defining the "Delta" variable only if it's already defined!
You would think that if the variable is already pointing to a
valid object you should be skipping.. Maybe you should be clearing that
object first before entering this procedure and then be checking for the
"VarisNull" and not the reverse..

that's my assessment..

Loading...