Autor Beitrag
LuGo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Sa 16.01.10 10:18 
Hallo,

ich verusche mit Delphi 7 Personal die Datenbankunterstützung hinzukriegen. Ich arbeite dafür mit dem Kadao-Pack für Delphi 5 und 6 Personal, aber so wie ich das im Forum gelesen habe, kann ich das mit der version für delphi 6 machen.

Also ich habe, so wie hier im Forum gesagt wurde, in die Fehlerwerfenden Units in die Uses Variants eingebaut und DsgnIntf mit DesignIntf und DesignEditor getauscht. Jeztz kommt zum Schluss eine Meldung in der Unit CommonDirectives die Fehlermeldung Unit erwartet aber Dateiende gefunden. Was soll ich tun?

Mfg und Dank

LuGo


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Sa 16.01.2010 um 12:15
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19339
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 16.01.10 10:32 
Da hast du vermutlich etwas vom normalen Gerüst der Unit gelöscht. Also z.B. das Schlüsselwort unit am Anfang oder ein end.

Ohne den entsprechenden Quelltext kann man da aber kaum mehr dazu sagen.
LuGo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Sa 16.01.10 10:47 
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:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
//******************************************************************************
// COMMON PREPROCESSOR DIRECTIVES
//******************************************************************************
{$DEFINE DYNADAO}        //This is the preffered way to use DAO - disable if
                         //one of the bottom options are enabled
{DEFINE DAO35}           //Disable DYNADAO and DAO36 to USE
{DEFINE DAO36}           //Disable DYNADAO and DAO35 to USE
//******************************************************************************
// Protection for absent-minded people
//******************************************************************************
{$IFDEF DYNADAO}
  {$IFDEF DAO36}
   YOU CANNOT DEFINE BOTH DYNADAO AND DAO36
  {$ENDIF}
  {$IFDEF DAO35}
   YOU CANNOT DEFINE BOTH DYNADAO AND DAO35
  {$ENDIF}
{$ELSE}
  {$IFDEF DAO36}
     {$IFDEF DAO35}
        YOU CANNOT DEFINE BOTH DAO35 AND DAO36
     {$ENDIF}
  {$ENDIF}
{$ENDIF}
{$IFNDEF DYNADAO}
  {$IFNDEF DAO35}
   {$IFNDEF DAO36}
      YOU MUST DEFINE DAO35 OR DAO36 OR DYNADAO
     {$ENDIF}
  {$ENDIF}
{$ENDIF}
//******************************************************************************
{**************************************************** defines for C++Builder 1 }
{$IFDEF VER93}
  {$DEFINE D1UP}
  {$DEFINE D2UP}
  {$DEFINE CBUILDER}
  {$DEFINE CBUILDER1}
  {$DEFINE CBUILDER1UP}
{$ENDIF}

{********************************************************  defines for Delphi 3 }
{$IFDEF VER100}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI3}
  {$DEFINE D1UP}
  {$DEFINE D2UP}
  {$DEFINE D3UP}
{$ENDIF}

{****************************************************  defines for C++Builder 3 }
{$IFDEF VER110}
  {$DEFINE D1UP}
  {$DEFINE D2UP}
  {$DEFINE D3UP}
  {$DEFINE CBUILDER}
  {$DEFINE CBUILDER3}
  {$DEFINE CBUILDER1UP}
  {$DEFINE CBUILDER3UP}
{$ENDIF}

{********************************************************  defines for Delphi 4 }
{$IFDEF VER120}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI4}
  {$DEFINE D1UP}
  {$DEFINE D2UP}
  {$DEFINE D3UP}
  {$DEFINE D4UP}
{$ENDIF}

{****************************************************  defines for C++Builder 4 }
{$IFDEF VER125}
  {$DEFINE D1UP}
  {$DEFINE D2UP}
  {$DEFINE D3UP}
  {$DEFINE D4UP}
  {$DEFINE CBUILDER}
  {$DEFINE CBUILDER4}
  {$DEFINE CBUILDER1UP}
  {$DEFINE CBUILDER3UP}
  {$DEFINE CBUILDER4UP}
{$ENDIF}

{************************************* defines for Delphi 5 and/or C++Builder 5 }
{$IFDEF VER130}
  {$DEFINE D1UP}
  {$DEFINE D2UP}
  {$DEFINE D3UP}
  {$DEFINE D4UP}
  {$DEFINE D5UP}
  {$IFNDEF BCB}
    {$DEFINE DELPHI}
    {$DEFINE DELPHI5}
  {$ELSE}
    {$DEFINE CBUILDER}
    {$DEFINE CBUILDER5}
    {$DEFINE CBUILDER1UP}
    {$DEFINE CBUILDER3UP}
    {$DEFINE CBUILDER4UP}
    {$DEFINE CBUILDER5UP}
  {$ENDIF}
{$ENDIF}

{***************************************************** **** defines for Delphi 6 }
{$IFDEF VER140}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI6}
  {$DEFINE D1UP}
  {$DEFINE D2UP}
  {$DEFINE D3UP}
  {$DEFINE D4UP}
  {$DEFINE D5UP}
  {$DEFINE D6UP}
{$ENDIF}

{$IFDEF WIN32}
  {$DEFINE MSWINDOWS}
  {$DEFINE 32BIT}
{$ENDIF}

{$IFDEF DELPHI}
  {$IFDEF D2UP}
    {$DEFINE DELPHI_32BIT}
  {$ENDIF}
{$ENDIF}

{$IFDEF CBUILDER}
  {$DEFINE CBUILDER_32BIT}
{$ENDIF}
//******************************************************************************




Hier der entsprechende Quelltext.

Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19339
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 16.01.10 10:58 
Ich habe mir das einmal angeschaut. Die Entwickler haben echt Humor... :autsch: Nennen eine Includedatei .pas... :autsch:

Das ist gar keine Unit. Ich habe es gerade mit D7 PE ausprobiert. Du musst nur ganz unten in der Includedatei CommonDirectives.pas einfügen (und diese Datei darf nicht als Unit in der uses des Projekts stehen, das ist schon so im Original):
user profile iconSvenAbeln hat folgendes geschrieben Zum zitierten Posting springen:
In CommonDirectives.pas, fehlt ein Block mit Defines für Delphi 7.
Folgendes einfach hinter dem Block für Delphi 6 einfügen.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
{***************************************************** **** defines for Delphi 7 }
{$IFDEF VER150}
  {$DEFINE DELPHI}
  {$DEFINE DELPHI7}
  {$DEFINE D1UP}
  {$DEFINE D2UP}
  {$DEFINE D3UP}
  {$DEFINE D4UP}
  {$DEFINE D5UP}
  {$DEFINE D6UP}
  {$DEFINE D7UP}
{$ENDIF}
Und dann noch im Quelltext des Packages (Projekt --> Quelltext anzeigen) die erste Zeile ändern in:
ausblenden Delphi-Quelltext
1:
package KADaoPED6;					
LuGo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Sa 16.01.10 12:23 
Entweder ich stell mich zu doof an, nur wenn ich das, was oben beschrieben ist, befolge gibt er folgenden Fehler in den Uses der Unit KDAODATABASE aus:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Uses
DAOApi,
ComObj,
{$IFDEF DAO35}
DAO35Api,
{$ENDIF}
{$IFDEF DAO36}
DAO36Api,
{$ENDIF}
Windows, SysUtils, Classes, FileCtrl, DbLoginUnit, Registry, TypInfo,
{$IFDEF USEDB}, DB, KADaoDummyDataset, DaoUtils{$ENDIF}
{$IFDEF D6UP} (also hier), Variants{$ENDIF};

[Fehler] KDaoDataBase.pas(306): Bezeichner erwartet, aber ',' gefunden

Was soll ich da jetzt einfügen???

MFG

LuGo

Moderiert von user profile iconGausi: Delphi-Tags hinzugefügt
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19339
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 16.01.10 12:26 
Da ist ein Komma zu viel drin.
user profile iconLuGo hat folgendes geschrieben Zum zitierten Posting springen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
{$ENDIF}
Windows, SysUtils, Classes, FileCtrl, DbLoginUnit, Registry, TypInfo,
{$IFDEF USEDB}, DB, KADaoDummyDataset, DaoUtils{$ENDIF}
{$IFDEF D6UP} (also hier), Variants{$ENDIF};
LuGo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33



BeitragVerfasst: Sa 16.01.10 12:35 
Jetzt sagt er mir schon wieder, das er eine UNIT braucht.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19339
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 16.01.10 12:38 
Versuch es einmal mit dem Paket aus dem Thread aus dem ich oben zitiert habe:
www.delphi-forum.de/....php?p=570115#570115
Damit funktionierte es bei mir mit den beiden genannten Änderungen...

Wenn bei dir nach einer Unit gefragt wird, ist in dem Package eine der Möchtegernunits, die Includedateien sind, als Unit in einer uses.