Autor Beitrag
Schumi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 33

Win XP, Linux
D7 Prof., D2006 Entpr.
BeitragVerfasst: Fr 01.04.05 08:20 
Hallo zusammen,

benutze dbExpress, um auf eine Oracle Datenbank zuzugreifen (mit den CoreLab-Treibern der Zusatz-CDs von Delphi 7).
Dies funktioniert mit der Kompo TSQLQuery auch wunderbar. Aber nur solange die Anzahl der zurückgelieferten Felder eines SELECT-Queries die Anzahl 6 nicht übersteigt.
Ist dies der Fall, gibt Delphi eine Fehlermeldung "dbExpress: Das Feld XYZ wurde nicht gefunden!".

Hat jemand eine Idee?

Vielen Dank!
webbi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 142

Win XP Pro SP2, Debian GNU/Linux 2.6
D5 Pro, D7 Pro, BDS2006, Kylix3, MS-VS 2005
BeitragVerfasst: Fr 01.04.05 10:33 
Ich benutzte Selber die CoreLab-Komponenten, Allerdings mit MS-SQL...

Hatte aber auch bei 154 Feldern noch keine Probleme...

Poste doch mal den Query...
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Fr 01.04.05 10:43 
Hast du das schon mal mit einer anderen Tabelle oder dem "*" im Select probiert?
Vielleicht hast du dich auch wirklich nur vertippt und das Feld heißt gar nicht "XYZ"?
Schumi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 33

Win XP, Linux
D7 Prof., D2006 Entpr.
BeitragVerfasst: Fr 01.04.05 10:45 
Hier einmal der Code, den ich verwende:

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
procedure TfrmHardware.DruckerdatenLaden(dname: string);
var SQLText,hilfe  : string;
begin
  with frmMain.sqlqryOracle do
    begin
      Close;
      SQLText:='select DRUCKER_SN,DRUCKER_STPSN,DRUCKER_NAME,DRUCKER_DINASNAME,'+
               'DRUCKER_STANDORTID,DRUCKER_ANSCHLUSSID,DRUCKER_TYPID,DRUCKER_IPADRESSE'+
               ' from DRUCKER where DRUCKER_STPSN=:sn';

      SQL.Text:=SQLText;
      ParamByName('sn').AsString:=copy(dname,1,4);

      // ... und raus damit
      Active:=true;

      First;
      // Ergebnis in ListBox füllen
      while not eof do
        begin
          edtName.Text:=FieldByName('DRUCKER_NAME').AsString;
          mskedtSTPSN.Text:=FieldByName('DRUCKER_STPSN').AsString;
          edtSN.Text:=FieldByName('DRUCKER_SN').AsString;
          edtDINAS.Text:=FieldByName('DRUCKER_DINASNAME').AsString;
          hilfe:=FieldByName('DRUCKER_IPADRESSE').AsString;
          cmbxStandort.ItemIndex:=FieldByName('DRUCKER_STANDORTID').AsInteger-1;
          cmbxAnschluss.ItemIndex:=FieldByName('DRUCKER_ANSCHLUSSID').AsInteger-1;
          cmbxDruckertyp.ItemIndex:=FieldByName('DRUCKER_TYPID').AsInteger-1;
          Next;
        end;

      Active:=false;
    end;
end;


Wenn ich das ganze mit "Select * from ..." mache, ändert sich auch nichts!

Moderiert von user profile iconUGrohne: Code- durch Delphi-Tags ersetzt.
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Fr 01.04.05 10:50 
Hi
schau doch mal nach ob für die Query vielleicht noch persistente Felder angelegt sind, die jetzt nicht mehr stimmen. (Rechte Maustaste auf die Query und Feldereditor) Falls ja, löschen oder anpassen.

Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Fr 01.04.05 10:53 
Vermutlich bekommst du den Fehler in der Zuweisungsschleife. Oder doch schon beim Active:=True?
Kommentier die Zeile, bei der es passiert doch mal aus. Bekommst du dann den Fehler beim nächsten Feld auch?
Schumi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 33

Win XP, Linux
D7 Prof., D2006 Entpr.
BeitragVerfasst: Fr 01.04.05 11:01 
@jasocul: Der Fehler passiert in der Zuweisungsschleife und auch bei auskommentierter Zeile (dann halt das nächste Feld)

@LCS : Persistente Felder gibts leider auch keine

Habe auch bei anderen Projekten (und auch anderen Oracle-Datenbanken) diesen Fehler. Bei CoreLab und dem M$-SQL-Server hatte ich nie Probleme!
webbi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 142

Win XP Pro SP2, Debian GNU/Linux 2.6
D5 Pro, D7 Pro, BDS2006, Kylix3, MS-VS 2005
BeitragVerfasst: Fr 01.04.05 11:46 
Ich würde mal testen, ob es an CoreLab liegt...

Gibt es für Oracle nicht auch einen QueryAnalyzer? - Würde da einfach mal den Query testen...

Hier noch ein paar andere Oracle-Komponenten: www.torry.net/quicks...oracle&Title=Yes
Schumi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 33

Win XP, Linux
D7 Prof., D2006 Entpr.
BeitragVerfasst: Mo 04.04.05 10:28 
So, Problem gelöst.
Habe eine neue Version der CoreLab-Treiber geladen. Das geht jetzt ab wie ein Zäpfchen :D

Trotzdem vielen Dank für Eure Hilfe!