Autor Beitrag
mrbug
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44

Win XP,Win 2000,Suse 9.0
D7 Ent. , K3 Ent.
BeitragVerfasst: Mo 05.07.04 08:16 
Guten Morgen!

Ich habe folgendes Problem:

Uber einen timer mache ich jede Sekunde einen Query-refresh auf eine Datenbank im Netz. Ich verwende dazu dbexpress-Komponenten (SQLConnection+SQLQuery).Nun möchte eine Fehlerbehandlung mit try...except implementieren, sodass , sobald die Netzwerkverbindung aus irgendeinem Grund unterbrochen wird, eine nachricht ausgegeben wird.

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if          chkbx_zyklisch.Checked   then                       //nur wenn ich das auch will...
  begin
    ZeitStart(Self);
  try
    DataModule1.SQLQuery1.Refresh;
  except
    ShowMessage('Verbindung  verloren!');
  end;
  ZeitStop(Self);
  edt_RefreshZeit.Text := IntToStr(LaufZeit);
  Ausgabe_Edit_Felder(Self);
  end;
end;


Leider funktioniert das in dieser Form nicht. Ziehe ich das LAN raus, erscheint folgende Fehlermeldung:

Error der Klasse EcwbError, Meldung 'cwbDB_Fetch returned error code 6053'...

:(

Hat jemand eine Idee??

Markus

_________________
HoffentlichbaldkeinAnfängermehrseier
MAlsleben
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 303

W2k,WinXP
D3 - DXE3 Enterprise
BeitragVerfasst: Di 06.07.04 08:37 
Hi,

startest Du das Programm von Delphi aus?

Gruß Micha.

_________________
Viele Wege führen nach Rom.
mrbug Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44

Win XP,Win 2000,Suse 9.0
D7 Ent. , K3 Ent.
BeitragVerfasst: Di 06.07.04 15:45 
ja so ists

_________________
HoffentlichbaldkeinAnfängermehrseier
MAlsleben
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 303

W2k,WinXP
D3 - DXE3 Enterprise
BeitragVerfasst: Mi 07.07.04 11:35 
Hi,

wenn Du das Programm aus Delphi heraus startest, läuft automatisch der Delphi interne Debugger mit. Deswegen bekommst Du auch die Fehlermeldung, die Du eigentlich unterdrücken willst. Startest das Programm außerhalb von Delphi, dann sollte das so wie Du willst funktionieren, würde ich zumindest auf den ersten Blick sagen.

Gruß Micha

_________________
Viele Wege führen nach Rom.
djmasi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 54

Win XP Prof. Tablet PC Edition 2005
D7 Enterprise
BeitragVerfasst: Mi 07.07.04 21:54 
Habe das Problem mit einer Firebird DB.

Aber schau mal hier. Im Moment habe ich es so gelöst:
Meine Lösung
mrbug Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44

Win XP,Win 2000,Suse 9.0
D7 Ent. , K3 Ent.
BeitragVerfasst: Do 08.07.04 11:06 
Dankeschön. Ich werds mal probieren!

_________________
HoffentlichbaldkeinAnfängermehrseier