Autor Beitrag
Bronstein
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 578
Erhaltene Danke: 1

WIN XP
Delphi 6 / Delphi 2006 / Delphi XE
BeitragVerfasst: Di 18.09.07 12:02 
Wenn ich eine Verbindung mit dem Oracle-ODBC-Treiber 10.02.00.01und AdoConnection aufbaue, funktioniert diese. Abfragen kann ich auch machen.

Wenn ich mein Programm beende bekomme ich eine Fehlermeldung, wegen Speicherverletzung.

Das ist mein Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
procedure TForm1.ADOConnection1WillConnect(Connection: TADOConnection;
  var ConnectionString, UserID, Password: WideString;
  var ConnectOptions: TConnectOption; var EventStatus: TEventStatus);
begin
  ConnectionString := 'Provider=MSDASQL.1;Password=pwd;Persist Security Info=True;User ID=Benutzer;Extended Properties="DRIVER={Oracle ODBC Driver};SERVER=CAQ1_RQM1.WORLD;UID=Benutzer;PWD=pwd;DBQ=CAQ1_RQM1.WORLD;';
  ConnectionString := ConnectionString + 'DBA=W;APA=T;EXC=F;XSM=Default;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;BTD=F;BAM=IfAllSuccessful;NUM=NLS;DPM=F;MTS=T;MDI=Me;CSR=F;FWC=F;FBS=60000;TLO=O;"';
  UserID := 'Benutzer';
  Password := 'pwd';
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
  AdoConnection1.Connected := true;
  AdoTable1.TableName := 'Tabellenname';
  AdoTable1.Open;
  ShowMessage(AdoTable1.FieldByName('Feld').AsString);
  AdoTable1.Close;
  AdoConnection1.Connected := false;
end;

_________________
Es gibt keine dummen Fragen nur dumme Antworten!!!
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 18.09.07 12:04 
Warum den Weg über
Ado->ODBC->Oracle-Client->Oracle?

_________________
Markus Kinzler.
Bronstein Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 578
Erhaltene Danke: 1

WIN XP
Delphi 6 / Delphi 2006 / Delphi XE
BeitragVerfasst: Di 18.09.07 12:41 
Warum nicht. Den ConnectionString habe ich mir zusammengeklickt!

_________________
Es gibt keine dummen Fragen nur dumme Antworten!!!
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 18.09.07 12:49 
Weil das abgesehen von der BDE der denkbar schlechteste weg ist.
Nimm lieber eine native Oracle-Kompo oder einen ADO-Treiber, wenn es schon ADO sein muss.

_________________
Markus Kinzler.
Bronstein Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 578
Erhaltene Danke: 1

WIN XP
Delphi 6 / Delphi 2006 / Delphi XE
BeitragVerfasst: Di 18.09.07 12:52 
Ich versteh nicht was du meinst?

_________________
Es gibt keine dummen Fragen nur dumme Antworten!!!
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 18.09.07 12:53 
Stell dir vor du kauft dir einen Porsche und ziehst ihn mit deinem alten UNO!

_________________
Markus Kinzler.
Bronstein Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 578
Erhaltene Danke: 1

WIN XP
Delphi 6 / Delphi 2006 / Delphi XE
BeitragVerfasst: Di 18.09.07 13:03 
Ja ok dir geht es um die Geschwindigkeit. Der Fehler ist aber trotzdem merkwürdig und das ist das was mich gerade interessiert!

_________________
Es gibt keine dummen Fragen nur dumme Antworten!!!