Autor Beitrag
Jacer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 105

Windows 7, Vista, Ubuntu
HTML,CSS,PHP,Delphi 7
BeitragVerfasst: Mo 19.02.07 17:22 
Könnte mir vielleiccht wer sagen wie ich eine CheckBox manuell in eine Paradox 7 eintrage? :?

Also ich habe mehrere Edit-Felder deren INhalt ich dann in die Tabelle eintrage und halt eine CheckBox. Allerdings weiß ich nicht wie ich die behandeln muss.

Bei der Abfrage müsste ja folgendes gehen:

ausblenden Delphi-Quelltext
1:
ChBoxBetrieb.Checked:= QueryFahrzeuge.FieldByName('Betrieb_Status').AsBoolean;					

_________________
A look in the eyes often says more than a hundred words could ever express.
raiguen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 374

WIN 2000prof, WIN XP prof
D7EP, MSSQL, ABSDB
BeitragVerfasst: Mo 19.02.07 17:35 
user profile iconJacer hat folgendes geschrieben:
Könnte mir vielleiccht wer sagen wie ich eine CheckBox manuell in eine Paradox 7 eintrage? :?

Wenn ich das richtig deute, dann möchtest du bestimmt den Status der Checkbox in einem (Paradox-)Tabellenfeld (Typ ftBoolean) 'festhalten'?
Wenn dem so ist dann geht's recht simpel:
ausblenden Delphi-Quelltext
1:
2:
3:
...
  tblFahrzeuge.FieldByName('Betrieb_Status').AsBoolean := ChBoxBetrieb.Checked;
...

Das Abspeichern des Checkbox-Status machste halt so wie du es bereits vorgeschlagen hast ;)
Jacer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 105

Windows 7, Vista, Ubuntu
HTML,CSS,PHP,Delphi 7
BeitragVerfasst: Mo 19.02.07 17:38 
Sehr gut und wie funktioniert das ganze bei einem Query mittels SQL?

EDIT: Achja und wenn ich in der Delphi Datenbankoberfläche die Paradox7 strukturiere, wie definiere ich das Feld als Boolean? Unter den Typen fine ich das nicht :?

_________________
A look in the eyes often says more than a hundred words could ever express.
raiguen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 374

WIN 2000prof, WIN XP prof
D7EP, MSSQL, ABSDB
BeitragVerfasst: Mo 19.02.07 17:51 
[quote="user profile iconJacer"]Sehr gut und wie funktioniert das ganze bei einem Query mittels SQL?
In der Art beispielsweise:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
  Query1.SQL.Text := 'UPDATE fahrzeuge SET betriebs_Status=:STATUS WHERE kfz_ID=:ID';
  Query1.ParamByName('STATUS').AsBoolean := ChBoxStatus.Checked;
  Query1.ParamByName('ID').AsInteger := {einedeutige Identnr für das Fahrzeug}
  Query1.ExecSQL;
  ...

user profile iconJacer hat folgendes geschrieben:
...Achja und wenn ich in der Delphi Datenbankoberfläche die Paradox7 strukturiere, wie definiere ich das Feld als Boolean? Unter den Typen fine ich das nicht :?

Dort ist als Feldtyp logisch auszuwählen ;)

//EDIT: SQL-Beispiel eingefügt


Zuletzt bearbeitet von raiguen am Mo 19.02.07 18:01, insgesamt 2-mal bearbeitet
Jacer Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 105

Windows 7, Vista, Ubuntu
HTML,CSS,PHP,Delphi 7
BeitragVerfasst: Mo 19.02.07 17:55 
Oh :D
Da hab ich drüber weg geschaut :roll:

Sorry da hat mein Browser wohl was falsches geladen bzw nur einen Teil! :?
Danke für die Hilfe

_________________
A look in the eyes often says more than a hundred words could ever express.