Hi,

I'm using Delphi XE3 with DOA 4.1.3.3 and still Delphi 2010 with DOA 4.1.2.2 (both 'Professional' edition).

I use the combination of TOracleDataSet -> TDataSetProvider -> TClientDataSet -> TDataSet for accessing and modifying a TDbGrid. With Delphi 2010 it works fine, but with Delphi XE3 I always get the error message 'Provider: SQL not supported' when 'ApplyUpdates' is performed. 'TDataSetProvider.ResolveToDataSet' is set to 'False'. If I set ResolveToDataSet = 'True', it works; but performance is bad. In Delphi 2010 I don't need to set this property.

I've debuged both applications and got the following result:
From procedure 'DoExecSQL' in 'Datasnap.Provider' there is a call to 'PSExecuteStatement' (I think it's in file OracleData). With Delphi 2010 it returns RowsAffected correctly, but with XE3 it jumps to 'Data.DbPSExecuteStatement' and raises the error 'SProviderSQLNotSupported'.

And when I tried to install DOA 4.1.3.5 I got at startup of XE3 the error message that the procedures entrypoint
'@Oracledata@TOracleDataSet@PSExecuteStatemenge$qqrx20System@UnicodeString15Data@DbTParamspv'
could not be found.

Have someone a solution for my problem or can explain what happens here?
This occurs because the DOA has not implemented all the methods of interface IProviderSupport:

{ IProviderSupport }
function PSExecuteStatement(const ASQL: string; AParams: TParams): Integer; overload; virtual;
function PSExecuteStatement(const ASQL: string; AParams: TParams;
var ResultSet: TDataSet): Integer; overload; virtual;
{$IFNDEF NEXTGEN}
function PSExecuteStatement(const ASQL: string; AParams: TParams;
ResultSet: Pointer = nil): Integer; overload; virtual; deprecated 'Use overloaded method instead';
{$ENDIF !NEXTGEN}


When the method is not implemented TDataset throws an exception:

function TDataSet.PSExecuteStatement(const ASQL: string; AParams: TParams): Integer;
begin
Result := 0;
DatabaseError(SProviderSQLNotSupported, Self);
end;

I'm testing in Delphi XE6 and this has not yet been resolved.

Edson Martins
This problem still exists at DOA 4.1.3.5 on XE6.

It makes the DOA unusable for us!

When it will be corrected?

Is there any workaround? We can not use 'ResolveToDataset := True'
Please can you let us know what we can do?
What is your plans with that.

This bug has been reported since 19-07-2013.

Thanks and regards
Hi,
fixing this issue takes about two minutes as edson suggested, so why is it taking so long?

For impatient ones, here is a workaround working on DOA 4.1.3.5 Standard and Delphi XE6 20.0.15596.9843:

Code
unit MyOracleData;

interface

uses OracleData, DB;

type
  TOracleDataSet = class(OracleData.TOracleDataSet)
  public
    function PSExecuteStatement(const ASQL: string; AParams: TParams): Integer; overload; override;
    function PSExecuteStatement(const ASQL: string; AParams: TParams;
      ResultSet: Pointer = nil): Integer; overload; override;
  end;

implementation

function TOracleDataSet.PSExecuteStatement(const ASQL: string; AParams: TParams): Integer;
var
  d: TDataSet;
begin
  d := nil;
  try
    Result := self.PSExecuteStatement(ASQL, AParams, d);
  finally
    d.Free;
  end;
end;

function TOracleDataSet.PSExecuteStatement(const ASQL: string; AParams: TParams;
      ResultSet: Pointer = nil): Integer;
var
  d: TDataSet;
begin
  if ResultSet = nil then
    d := nil
  else
    d := TDataSet(ResultSet^);
  Result := self.PSExecuteStatement(ASQL, AParams, d);
end;

end.

Classic interceptor Delphi pattern, just add MyOracleData to uses clause after OracleData.
Dear Marco, any news? Any comments? We really appreciate your comment and fix.
© Allround Automations forums