![]() |
Datenbank: SQL Server 2005, Oracle 9i • Zugriff über: ADO, DOA
ADO Recordset schliessen läuft auf Fehler
Delphi-Quellcode:
Beim Schliessen des Recordsets kommt die oben fettgedruckte fehlermeldung, hat jemand eine Idee was ich falsch mache.
procedure TfrmImport.splFahrzeuge_importieren;
var i: Integer; aSPLRS : Recordset; s : string; begin aSPLRS := CoRecordset.Create; oraSPLSess.LogonUsername := 'x'; oraSPLSess.LogonPassword := 'y'; oraSPLSess.Connected := True; oraVmsAppl.Open; if oraVmsAppl.RecordCount > 0 then begin oraVmsAppl.First; try aSPLRS.Open('SELECT * FROM dbo.tblSPLAppl', aVMSConn, adUseClient, adLockOptimistic, adCmdtext); sqlDelete.CommandText := 'TRUNCATE TABLE tblSPLAppl'; try sqlDelete.Execute; for i := 0 to oraVMSAppl.recordcount - 1 do begin aSPLRS.AddNew(EmptyParam, Emptyparam); aSPLRS.Fields['BCHLD'].Value := oraVmsApplBCHLD.AsString; aSPLRS.Fields['VVEHNO'].Value := oraVmsApplVVEHNO.AsInteger; aSPLRS.Fields['VVM'].Value := oraVmsApplVVM.AsString; aSPLRS.Fields['VTYP'].Value := oraVmsApplVTYP.AsString; aSPLRS.Fields['VMODEL'].Value := oraVmsApplVMODEL.AsString; aSPLRS.Fields['VFROM'].Value := oraVmsApplVMONF.AsString + '.' + oraVmsApplVYEARF.AsString; aSPLRS.Fields['VTO'].Value := oraVmsApplVMONT.AsString + '.' + oraVmsApplVYEART.AsString; aSPLRS.Fields['VCDM'].Value := oraVmsApplVCDM.AsFloat; aSPLRS.Fields['VHP'].Value := oraVmsApplVHP.AsInteger; aSPLRS.Fields['VKW'].Value := oraVmsApplVKW.AsFloat; aSPLRS.Fields['VSPLNO'].Value := oraVmsApplVSPLNO.AsInteger; aSPLRS.Fields['VRELNO'].Value := oraVmsApplVRELNO.AsInteger; aSPLRS.Update(EmptyParam, EmptyParam); oraVmsAppl.Next; end; except slLog.Add('Löschen der SPL Fahrzeugtabelle fehlgeschlagen'); end; finally aSPLRS.Close; [b]Hier läuft die Prozedur auf Fehler, warum ?[/b] [b]-- Operation is not allowed in this context --[/b] end; end; oraVmsAppl.Close; oraSPLSess.Connected := False; end; Gruss Uwe Helmer |
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:51 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