Autor Beitrag
bbfan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: So 29.01.06 13:11 
Hallo!

Wie kann ich beim CREATE TABLE oder später mit ALTER TABLE in einer Accessdatenbank in einer Tabelle die Option "Leere Zeichenfolge" auf "Nein" setzen.

Bei CREATE TABLE auf NOT NULL setzen ist nicht die Lösung. Das entspricht dem Wert "Eingabe erforderlich".

Viele Grüße!
digi_c
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1905

W98, XP
D7 PE, Lazarus, WinAVR
BeitragVerfasst: So 29.01.06 16:31 
Ich habe kein Acess, was bedeutet denn diese Option? Du willst einen leeren Defaultwert der nicht zwingend angegeben werden muss?
bbfan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: So 29.01.06 18:17 
"leere Zeichenfolge"="JA" bedeutet folgendes:

Nehmen wir an du hast eine Spalte vom Type "Text" also CHAR(50).
Und nun speicherst du ein Wort dort ab. z.B. "Hallo".
Dann wird "HALLO " gespeichert. Also das Wort "HALLO" + 45 Leerzeichen.

Das kommt schlecht, wenn du später wieder die Tabelle auslieset, da alles voller unnützer Leerzeichen ist.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: So 29.01.06 18:31 
Statt CHAR VARCHAR nehmen oder beim Select "trimmen"

_________________
Markus Kinzler.
bbfan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 164



BeitragVerfasst: So 29.01.06 19:03 
VARCHAR hilft leider nicht.
Derzeit habe ich es mit trimmen umgangen. Aber das ist keine saubere Lösung.
Muss doch über SQL möglich sein....
digi_c
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1905

W98, XP
D7 PE, Lazarus, WinAVR
BeitragVerfasst: So 29.01.06 19:29 
Ich muss gestehen das ich da auch immer trimme. Ich wüßte nicht wie es anders gehen sollte. Zumal ich an dem bestehenden DB Architektur nichts ändern könnte :D