![]() |
Datenbank: SQL Express • Version: 2005 • Zugriff über: ADO
_Recordset: Interface not supported
Hallo,
Ich habe ein Problem mit einem verbindungslosem Recordset, dass ich über TSocketConnection von einem einem Server erhalten möchte. Der Server stellt die Funktion "GetRs(Query: widestring): OleVariant " bereit, welche ein Recordset als OleVariant zurückgibt:
Delphi-Quellcode:
auf der Client Seite versuche ich nun den OleVariant wert in ein _Recordset zu casten, doch ich erhalte eine "Interface not supported" exception:
function TMyRemoteDataModule.GetRS(const AQuery: WideString): OleVariant;
var aRs: _Recordset; begin aRs := CoRecordset.Create(); aRs.Set_ActiveConnection(AConnectionObject); aRs.Open(AQuery,AConnectionObject, adOpenKeyset, adLockBatchOptimistic, adCmdText); result := aRS; //Ars; aRs.Set_ActiveConnection(nil); end
Delphi-Quellcode:
Kann mir hier jemand weiterhelfen?
procedure TClientDataModule.GetRecordSet(AQuery: WideString; var ARecordset: _Recordset);
var rsOV: OleVariant; temp: IDispatch; begin rsOV := DBConnectionBroker.AppServer.GetRS(AQuery); temp := IDispatch(rsov); // das funktioniert! ARecordset := IDispatch( rsOV) as _Recordset; //hier wird die exception ausgelöst! end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:39 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz