Print Thread
SProviderSQLNotSupported on DOA with Delphi XE3
#47489 07/19/13 09:18 AM
Joined: Mar 2000
Posts: 8
Herdecke, NRW, Germany
S
Member
OP Offline
Member
S
Joined: Mar 2000
Posts: 8
Herdecke, NRW, Germany
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?

Re: SProviderSQLNotSupported on DOA with Delphi XE3
Schlueter #49102 06/11/14 02:40 PM
Joined: Jun 2014
Posts: 1
E
Member
Offline
Member
E
Joined: Jun 2014
Posts: 1
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

Re: SProviderSQLNotSupported on DOA with Delphi XE6
edson #49345 08/06/14 06:49 AM
Joined: Jan 2004
Posts: 59
G
Member
Offline
Member
G
Joined: Jan 2004
Posts: 59
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'

Re: SProviderSQLNotSupported on DOA with Delphi XE6
giga #49350 08/06/14 08:54 AM
Joined: Jan 2004
Posts: 59
G
Member
Offline
Member
G
Joined: Jan 2004
Posts: 59
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

Re: SProviderSQLNotSupported on DOA with Delphi XE6
giga #49372 08/11/14 09:00 AM
Joined: Aug 2014
Posts: 4
P
Member
Offline
Member
P
Joined: Aug 2014
Posts: 4
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.

Re: SProviderSQLNotSupported on DOA with Delphi XE6
PreXident #49836 12/02/14 07:51 AM
Joined: Jan 2004
Posts: 59
G
Member
Offline
Member
G
Joined: Jan 2004
Posts: 59
Dear Marco, any news? Any comments? We really appreciate your comment and fix.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4