Autor Beitrag
Danny W.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: Di 14.11.06 09:46 
Hallo,

ich habe hier eine Unit mit der funktion

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
function Tdirectmysql.Status(var results:string):Boolean;
begin
 results:=MysqlClient.stat;
 result:=true;
end;


diese will ich mit

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Status;
begin
 db1.Status(result[4]); //4tes Item des Array of String
 label1.caption:=result[4]; //4tes Item des Array of String
end;


in meine andere Unit aufrufen.. und mit
ausblenden Delphi-Quelltext
1:
Status;					

in meine Form einbinden.

leider bekomme ich immer eine exception der Klasse EAccessViolation.

Was kann ich hier tun?

mfG

_________________
"Ich find den Fehler nicht. Der Artist wird immer als "Syntax Error" gezeigt :("
"Ach verdammt, der Artist heißt wirklich "Syntax Error" xD"


Zuletzt bearbeitet von Danny W. am Di 14.11.06 10:02, insgesamt 1-mal bearbeitet
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Di 14.11.06 10:00 
einmal belegst du results und einmal result : :gruebel:

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
Danny W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: Di 14.11.06 10:02 
meinst du in der ersten function? Das muss anscheinend so..die kommt nicht von mir und es hat ja schonmal funktioniert.

mfG

_________________
"Ich find den Fehler nicht. Der Artist wird immer als "Syntax Error" gezeigt :("
"Ach verdammt, der Artist heißt wirklich "Syntax Error" xD"
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Di 14.11.06 10:08 
mach mal n showmessage(inttostr(high(result)));
rein und schau, ob auch mindestens 4 einträge drin sind...

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
Danny W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: Di 14.11.06 10:13 
"High kann nicht auf lange Stringtypen angewendet werden"
Wenn ich so probiere
ausblenden Delphi-Quelltext
1:
showmessage(result[4]);					

bekomme ich wieder den gleichen fehler..

_________________
"Ich find den Fehler nicht. Der Artist wird immer als "Syntax Error" gezeigt :("
"Ach verdammt, der Artist heißt wirklich "Syntax Error" xD"
Danny W. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 296

Windows XP, WIN 2000
Delphi 2005 PE
BeitragVerfasst: Di 14.11.06 10:14 
Ok, ich hab das problem gelöst :) ich hab vorher irgendwo die verbindung wieder geschlossen :) trotzdem danke zeitgeist

_________________
"Ich find den Fehler nicht. Der Artist wird immer als "Syntax Error" gezeigt :("
"Ach verdammt, der Artist heißt wirklich "Syntax Error" xD"