Autor Beitrag
manfred07
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 56



BeitragVerfasst: So 27.03.05 01:02 
Hi Delphi-Gemeinde,

kann mir einer von euch helfen?

Ich habe eine Adressen Datenbank die ich auch schon gefüttert habe nun habe ich mir gedacht das ich mir noch eine Spalte mit der eMail Adresse zu mache. Die Tabelle ist in Paradox mit D5.

Nun meine frage, ist es möglich während der Laufzeit die neue Spalte in die Tabelle einzufügen und zu speichern?

Oder das ich in der Laufzeit eine neue Tabelle erstelle und denn kompletten Datensatz von der anderen Tabelle in die neue einfügen kann?

Danke schön im voraus und frohe Ostern......

Manfred

Moderiert von user profile iconTino: Überflüssige Absätze entfernt.
SandTarnFarbe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

Win XP, Win 2003 Server
D7 Pers
BeitragVerfasst: So 27.03.05 01:12 
Titel: Vielleicht so
hallo, vielleicht funktioniert es so (arbeite sonst mit access):

ausblenden Quelltext
1:
table.fielddefs.add('email'. ftstring, 100, false)					
Harry M.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 754

Win 2000, XP
D2005
BeitragVerfasst: So 27.03.05 01:34 
du kannst deine db auch noch nachträglich mit der datenbankoberfläche bearbeiten. dürfte bei deinem delphi dabei sein.
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: So 27.03.05 04:59 
Hi
zur Laufzeit gehts am einfachsten mit SQL
ausblenden Quelltext
1:
ALTER TABLE Tabellenname ADD Feldname VARCHAR(Stringlänge)					

Das SQL mit einer TQuery Komponente abschicken und fertig.

Wenn das allerdings nur eine einmalige Änderung ist solltest du lieber die Änderung extern mit der DB-Oberfläche machen und anschliessend dein Programm entsprechend anpassen.

Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: So 27.03.05 10:15 
hallo manfred!

die lösung von sandtarnfarbe funktioniert nur beim neuerstellen einer tabelle. halte dich beim ändern von tabellenfeldern lieber an die vorschläge von LCS oder user-xy2004, dann funktionierts gleich viel besser ;)

_________________
mfg, stefan
SandTarnFarbe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 26

Win XP, Win 2003 Server
D7 Pers
BeitragVerfasst: So 27.03.05 12:11 
user profile icongrayfox hat folgendes geschrieben:
hallo manfred!

die lösung von sandtarnfarbe funktioniert nur beim neuerstellen einer tabelle. halte dich beim ändern von tabellenfeldern lieber an die vorschläge von LCS oder user-xy2004, dann funktionierts gleich viel besser ;)


habe ja auch direkt reingeschrieben: vielleicht .......
manfred07 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 56



BeitragVerfasst: Mi 30.03.05 21:59 
Hi Delphi-Gemeinde,

tut mir leid das ich mich erst jetzt bedanke.....aber mein Rechner
hatte leider am 28.03. den Geist auf gegeben (CPU wurde zu heiß...) :evil:
konnte mir erst Heute ein neues Board mit CPU besorgen. :D

So und jetzt will ich mich erstmal bedanken für eure Antworten.
Ich werde es mal aus Probieren wenn ich Delphi wieder drauf habe....
werde mich noch mal melden.

Gruß Manfred
manfred07 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 56



BeitragVerfasst: Sa 02.04.05 20:27 
Hi LCS,

ich habe es mal so wie du gesagt hast aus probiert :cry: , aber
ich bekomme immer eine Fehlermeldung:

" Fehler beim Erstellen des Cursor-Handle "
oder
mir fehlt eine " resttemp.DB "

Das habe ich eingegeben:

ALTER TABLE Adresse ADD eMail VARCHAR(50)

oder auch

ALTER TABLE Adresse ADD eMail(50)

kannst du mir da weiter Helfen?

Gruß Manfred